h6. [[TerritoryManager]] h6(. » [[Territory SWI Calls|SWI Calls]] h6((. » Territory_ConvertTimeFormats h2. Territory_ConvertTimeFormats h5. (SWI &43078) |_<^{width:4em}. Entry | | |<^. R0 |<^. [[Territory Numbers|Territory number]], or -1 for current territory | |<^. R1 |<^. Pointer to input block | |<^. R2 |<^. Pointer to output block | |/8<^. R3 |<^. Conversion flags: | |<^. Bits 0-7: "Input format":#formats | |<^. Bits 8-15: "Output format":#formats | |<^. Bit 16: Convert as though DST was in use | |<^. Bit 17: If DST calculation unavailable (bit 18), use standard time instead of erroring | |<^. Bit 18: Calculate bit 16 automatically | |<^. Bit 19: Treat R4 as a signed time adjust in centiseconds | |<^. Bits 20-31: Reserved, should be zero | |<^. R4 |<^. Timezone within territory, or signed number of centiseconds | |_<^{width:4em}. Exit | | |<^. - |<^. Buffer at R2 updated | h4(#formats). Input/output formats |_<^{width:4em}. # | | |<^. 0 |<^. Local [[Date Time Ordinal Block]] | |<^. 1 |<^. Local 5-byte time | |<^. 2 |<^. UTC [[Date Time Ordinal Block]] | |<^. 3 |<^. UTC 5-byte time | |<^. 4+ |<^. Reserved for future expansion | h4. Use This SWI can be used to convert times between different formats and timezones. h4. Notes Input ordinals only need to be 28 bytes long (day-of-week and day-of-year not used), output ordinals are 36 bytes long. Ordinal blocks must be word aligned, while 5-byte time blocks can be byte aligned. R0, R4, and R3 bits 16-18 are only required when converting between UTC and local time (or vice-versa); if conversion is local-local or UTC-UTC they can be omitted. This SWI was introduced in TerritoryManager 0.47. For earlier versions, see the list below for the relevant conversion SWIs that are available. h4. See also * [[Territory_ConvertOrdinalsToTime]] * [[Territory_ConvertTimeToOrdinals]] * [[Territory_ConvertTimeToUTCOrdinals]]