- dt = datetime:toLocal()
- dt = datetime:toUTC()
SYNOPSIS
DESCRIPTION
datetime:toLocal converts a date/time from the UTC time zone to the local time, while datetime:toUTC does the reverse.
RETURN VALUE
NOTES
The system clock always runs on UTC time and does not know anything about local time zones.
Use the provided functions to convert between UTC and local time. It is recommended to do all internal date/time processing using UTC and only convert to local time when displaying a date/time to a user. That way, the software almost never needs to care about timezones and daylight saving rules.
Information about the local time zone is stored in the global kconfig configuration area and initialized on the first call to any local time function.
Local/UTC time conversion is done using the public domain zoneinfo codebase.