An overview of SYST
constants is available to you any time. With a small demo report, which highlights / explains timezones.
There are quite a few system constants available concerning dates and timezones:
SY-DAYST
Daylight savings time, indicates "summertime" (+1 hour) or notSY-TZONE
Time difference to the UTC reference time in seconds, ignoring daylight savings time.SY-TIMLO
Time in the current user's time zone.SY-ZONLO
User's time zone.SY-UZEIT
The actual time, in which theSY-TZONE
will have been processed. Use statementGET TIME
in your Abap logic to refresh this timeSY-DATUM
Today's date.SY-DATLO
Date in the current user's time zone.SY-FDAYW
Factory calendar weekday. "1" for Monday, ..., "5" for Friday.
The example report below will simply output the system fields to a report.
write: / SY-DAYST, 14 'Daylight savings time, indicates "summertime" (+1 hour) or not', / SY-TZONE, 14 'Time difference to the UTC reference time in seconds, ignoring daylight savings time.', / SY-TIMLO, 14 'Time in the current user''s time zone.', / SY-ZONLO, 14 'User''s time zone.', / SY-UZEIT, 14 'The actual time, in which the SY-TZONE will have been processed.', / SY-DATUM, 14 'Today''s date.', / SY-DATLO, 14 'Date in the current user''s time zone.', / SY-FDAYW, 14 'Factory calendar weekday. "1" for Monday, ..., "5" for Friday. '.
Which would result in
Daylight savings time, indicates "summertime" (+1 hour) or not 3.600 Time difference to the UTC reference time in seconds, ignoring daylight savings time. 14:21:28 Time in the current user's time zone. CET User's time zone. 14:21:28 The actual time, in which the SY-TZONE will have been processed. 14.11.2016 Today's date. 14.11.2016 Date in the current user's time zone. 1 Factory calendar weekday. "1" for Monday, ..., "5" for Friday.
Note the 3.600 on the SY-TCODE
field, it's the number of seconds between system time in system timezone (CET in this example) and the user time. This could for example play a role when your user changes something on a PO: the change date/time will reflect the user date/time. However if something is printed, the SPOOL creation time will reflect an hour earlier, the system time.