dateTimeLocalToUTC()
Last updated 10/09/2024
ThedateTimeLocalToUTC()
is a function on the Five
object that converts the current local date and time to a UTC timestamp.
info
When using the
dateTimeLocalToUTC()
function on a table event the data type for the field must be TimeStamp.Available
Client and Server
Function Signature
dateTimeLocalToUTC(localDateTime: string) : string;
Return Value
A string representing the current timestamp in UTC time zone, formatted as RFC 3339Example Output
Output, local timezone is AEST UTC/GMT +10 hours
console.log(five.dateTimeLocalToUTC('2024-02-14T13:59:00.000+10:00')); // output '2024-02-14 03:59:00'