Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | Territory number, or -1 for current territory |
R1 | Pointer to input block |
R2 | Pointer to output block |
R3 | Conversion flags: |
Bits 0-7: Input format | |
Bits 8-15: Output format | |
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 | |
Timezone within territory | |
R4 | Timezone within territory, or signed number of centiseconds |
Exit | |
---|---|
- | Buffer at R2 updated |
# | |
---|---|
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 |
This SWI can be used to convert times between different formats and timezones.
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.