core/utils/date_time_helper library

Properties

getCurrentTimestampUTC String
Get the current timestamp in UTC format.
no setter
getCurrentTimestampWithOffset String
Get the current timestamp in the local timezone format.
no setter

Functions

formatTimestamp(DateTime dateTime) String
Helper function to format a DateTime object to human readable format i.e. 2025-06-05T12:33:32 will be readable as 5th June 2025, 12:33 PM
formatTimestampForUTC(DateTime dateTime) String
Format a DateTime object to a string in UTC format.
formatTimestampForWithOffset(DateTime dateTime) String
Format a DateTime object to a string in the local timezone format.
parseAndFormatTimestamp(String timestamp) String
Helper function to parse a string timestamp to human readable format i.e. 2025-06-05T12:33:32 will be readable as 5th June 2025, 12:33 PM