DEV Community

Alex Karoza
Alex Karoza

Posted on


Local time of employees in Notion

Companies that have many employees working remotely, it's important to know the time of employees in their local time zone.

Unfortunately, Notion doesn't have a function to display UTC time, but a little magic and here's the formula:

formatDate(dateAdd(dateSubtract(now(), toNumber(formatDate(now(), "Z")), "hours"), prop("UTC"), "hours"), "HH:mm")
Enter fullscreen mode Exit fullscreen mode

UTC is the column that contains the difference between the employee's local time and Greenwich Mean Time. In the table, this column can be hidden.

The formula is used to get the UTC time:

dateSubtract(now(), toNumber(formatDate(now(), "Z")), "hours")
Enter fullscreen mode Exit fullscreen mode

The magic is hidden here: formatDate(now(), "Z"), Z is the time zone in ISO 8601. Our timezone is subtracted from our local time, thus obtaining UTC (GMT) time.

Latest comments (0)

Find what you were looking for? Sign up so you can:

🌚 Enable dark mode
πŸ”  Change your default font
πŸ“š Adjust your experience level to see more relevant content