1"use strict";(self.webpackChunkrewrite_docs=self.webpackChunkrewrite_docs||[]).push([["12814"],{59856:function(e,r,t){t.r(r),t.d(r,{frontMatter:()=>h,toc:()=>m,default:()=>p,metadata:()=>i,assets:()=>j,contentTitle:()=>l});var i=JSON.parse('{"id":"recipes/java/joda/time/jodadatetimezonetojavatime","title":"Migrate Joda-Time `DateTimeZone` to Java time","description":"org.openrewrite.java.joda.time.JodaDateTimeZoneToJavaTime","source":"@site/docs/recipes/java/joda/time/jodadatetimezonetojavatime.md","sourceDirName":"recipes/java/joda/time","slug":"/recipes/java/joda/time/jodadatetimezonetojavatime","permalink":"/recipes/java/joda/time/jodadatetimezonetojavatime","draft":false,"unlisted":false,"editUrl":"https://github.com/openrewrite/rewrite-docs/edit/master/docs/recipes/java/joda/time/jodadatetimezonetojavatime.md","tags":[],"version":"current","frontMatter":{"title":"Migrate Joda-Time `DateTimeZone` to Java time","sidebar_label":"Migrate Joda-Time `DateTimeZone` to Java time"},"sidebar":"docs","previous":{"title":"Migrate Joda-Time `DateTime` to `java.time.ZonedDateTime`","permalink":"/recipes/java/joda/time/jodadatetimetojavatime"},"next":{"title":"Migrate Joda-Time `Duration` to Java time","permalink":"/recipes/java/joda/time/jodadurationtojavatime"}}'),s=t(74848),a=t(84429),d=t(84109),n=t(93703),o=t(70440),c=t(48416);let h={title:"Migrate Joda-Time `DateTimeZone` to Java time",sidebar_label:"Migrate Joda-Time `DateTimeZone` to Java time"},l="Migrate Joda-Time DateTimeZone to Java time",j={},m=[{value:"Recipe source",id:"recipe-source",level:2},{value:"Used by",id:"used-by",level:2},{value:"Usage",id:"usage",level:2},{value:"See how this recipe works across multiple open-source repositories",id:"see-how-this-recipe-works-across-multiple-open-source-repositories",level:2},{value:"Data Tables",id:"data-tables",level:2},{value:"Source files that had results",id:"source-files-that-had-results",level:3},{value:"Source files that had search results",id:"source-files-that-had-search-results",level:3},{value:"Source files that errored on a recipe",id:"source-files-that-errored-on-a-recipe",level:3},{value:"Recipe performance",id:"recipe-performance",level:3}];function u(e){let r={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsxs)(r.h1,{id:"migrate-joda-time-datetimezone-to-java-time",children:["Migrate Joda-Time ",(0,s.jsx)(r.code,{children:"DateTimeZone"})," to Java time"]})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"org.openrewrite.java.joda.time.JodaDateTimeZoneToJavaTime"})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.em,{children:["Migrates ",(0,s.jsx)(r.code,{children:"org.joda.time.DateTimeZone"})," method calls to ",(0,s.jsx)(r.code,{children:"java.time.ZoneOffset"})," and ",(0,s.jsx)(r.code,{children:"java.time.ZoneId"}),"."]})}),"\n",(0,s.jsx)(r.h2,{id:"recipe-source",children:"Recipe source"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.a,{href:"https://github.com/openrewrite/rewrite-joda/blob/main/src/main/java/org/openrewrite/java/joda/time/JodaDateTimeZoneToJavaTime.java",children:"GitHub: JodaDateTimeZoneToJavaTime.java"}),",\n",(0,s.jsx)(r.a,{href:"https://github.com/openrewrite/rewrite-joda/issues",children:"Issue Tracker"}),",\n",(0,s.jsx)(r.a,{href:"https://artifacts.codegenomeproject.org/maven/org/openrewrite/recipe/rewrite-joda/",children:"Code Genome Project"})]}),"\n",(0,s.jsxs)(r.p,{children:["This recipe is available under the ",(0,s.jsx)(r.a,{href:"https://docs.moderne.io/licensing/moderne-source-available-license",children:"Moderne Source Available License"}),". Moderne customers can download precompiled artifacts from The Code Genome Project. For non-commercial use you can build the artifact from source locally."]}),"\n",(0,s.jsx)(r.h2,{id:"used-by",children:"Used by"}),"\n",(0,s.jsx)(r.p,{children:"This recipe is used as part of the following composite recipes:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/recipes/java/joda/time/nojodatime",children:"Prefer the Java standard library instead of Joda-Time"})}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(o.A,{recipeName:"org.openrewrite.java.joda.time.JodaDateTimeZoneToJavaTime",displayName:"Migrate Joda-Time `DateTimeZone` to Java time",groupId:"org.openrewrite.recipe",artifactId:"rewrite-joda",versionKey:"VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_JODA",hasDataTables:!0}),"\n",(0,s.jsx)(r.h2,{id:"see-how-this-recipe-works-across-multiple-open-source-repositories",children:"See how this recipe works across multiple open-source repositories"}
1),"\n","\n",(0,s.jsx)(c.A,{link:"https://app.moderne.io/recipes/org.openrewrite.java.joda.time.JodaDateTimeZoneToJavaTime"}),"\n",(0,s.jsx)(r.p,{children:"The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories."}),"\n",(0,s.jsxs)(r.p,{children:["Please ",(0,s.jsx)(r.a,{href:"https://moderne.io/product",children:"contact Moderne"})," for more information about safely running the recipes on your own codebase in a private SaaS."]}),"\n",(0,s.jsx)(r.h2,{id:"data-tables",children:"Data Tables"}),"\n",(0,s.jsxs)(d.A,{groupId:"data-tables",children:[(0,s.jsxs)(n.A,{value:"org.openrewrite.table.SourcesFileResults",label:"SourcesFileResults",children:[(0,s.jsx)(r.h3,{id:"source-files-that-had-results",children:"Source files that had results"}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"org.openrewrite.table.SourcesFileResults"})}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.em,{children:"Source files that were modified by the recipe run."})}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Column Name"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source path before the run"}),(0,s.jsxs)(r.td,{children:["The source path of the file before the run. ",(0,s.jsx)(r.code,{children:"null"})," when a source file was created during the run."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source path after the run"}),(0,s.jsxs)(r.td,{children:["A recipe may modify the source path. This is the path after the run. ",(0,s.jsx)(r.code,{children:"null"})," when a source file was deleted during the run."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Parent of the recipe that made changes"}),(0,s.jsx)(r.td,{children:"In a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Recipe that made changes"}),(0,s.jsx)(r.td,{children:"The specific recipe that made a change."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Estimated time saving"}),(0,s.jsx)(r.td,{children:"An estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cycle"}),(0,s.jsx)(r.td,{children:"The recipe cycle in which the change was made."})]})]})]})]}),(0,s.jsxs)(n.A,{value:"org.openrewrite.table.SearchResults",label:"SearchResults",children:[(0,s.jsx)(r.h3,{id:"source-files-that-had-search-results",children:"Source files that had search results"}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"org.openrewrite.table.SearchResults"})}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.em,{children:"Search results that were found during the recipe run."})}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Column Name"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source path of search result before the run"}),(0,s.jsx)(r.td,{children:"The source path of the file with the search result markers present."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source path of search result after run the run"}),(0,s.jsxs)(r.td,{children:["A recipe may modify the source path. This is the path after the run. ",(0,s.jsx)(r.code,{children:"null"})," when a source file was deleted during the run."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Result"}),(0,s.jsx)(r.td,{children:"The trimmed printed tree of the LST element that the marker is attached to."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Description"}),(0,s.jsx)(r.td,{children:"The content of the description of the marker."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Recipe that added the search marker"}),(0,s.jsx)(r.td,{children:"The specific recipe that added the Search marker."})]})]})]})]}),(0,s.jsxs)(n.A,{value:"org.openrewrite.table.SourcesFileErrors",label:"SourcesFileErrors",children:[(0,s.jsx)(r.h3,{id:"source-files-that-errored-on-a-recipe",children:"Source files that errored on a recipe"}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"org.openrewrite.table.SourcesFileErrors"})}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.em,{children:"The details of all errors produced by a re
1cipe run."})}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Column Name"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source path"}),(0,s.jsx)(r.td,{children:"The file that failed to parse."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Recipe that made changes"}),(0,s.jsx)(r.td,{children:"The specific recipe that made a change."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Stack trace"}),(0,s.jsx)(r.td,{children:"The stack trace of the failure."})]})]})]})]}),(0,s.jsxs)(n.A,{value:"org.openrewrite.table.RecipeRunStats",label:"RecipeRunStats",children:[(0,s.jsx)(r.h3,{id:"recipe-performance",children:"Recipe performance"}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"org.openrewrite.table.RecipeRunStats"})}),(0,s.jsx)(r.p,{children:(0,s.jsx)(r.em,{children:"Statistics used in analyzing the performance of recipes."})}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Column Name"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"The recipe"}),(0,s.jsx)(r.td,{children:"The recipe whose stats are being measured both individually and cumulatively."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source file count"}),(0,s.jsx)(r.td,{children:"The number of source files the recipe ran over."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Source file changed count"}),(0,s.jsx)(r.td,{children:"The number of source files which were changed in the recipe run. Includes files created, deleted, and edited."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cumulative scanning time (ns)"}),(0,s.jsx)(r.td,{children:"The total time spent across the scanning phase of this recipe."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Max scanning time (ns)"}),(0,s.jsx)(r.td,{children:"The max time scanning any one source file."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Cumulative edit time (ns)"}),(0,s.jsx)(r.td,{children:"The total time spent across the editing phase of this recipe."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Max edit time (ns)"}),(0,s.jsx)(r.td,{children:"The max time editing any one source file."})]})]})]})]})]})]})}function p(e={}){let{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.