You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm coming from moment, switching to dayjs and struggle with the display of UTC timestamps. I want the current timestamp in UTC format, including the timezone.
in moment, I called:
const moment = require('moment')
moment.utc().format('HH:mm:ss z')
'14:21:49 UTC'
Describe the bug
I'm coming from
moment
, switching todayjs
and struggle with the display of UTC timestamps. I want the current timestamp in UTC format, including the timezone.in
moment
, I called:with
dayjs
, I call:how can I make dayjs not display this
z
timezone asGMT+1
, but instead showUTC
?I found this call:
but I'd like to find a way to make dayjs in general to work with the
UTC
timezone, without have to convert every individual timestamp.Expected behavior
I would like instructions and/or updated documentation to show how to make dayjs show the
z
timezone asUTC
for autc()
timestamp.Information
1.10.8
Linux
Chrome 99
&nodejs 16.14.0
UTC
The text was updated successfully, but these errors were encountered: