question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to convert to UTC?

See original GitHub issue

I am struggling to convert my date to UTC.

Here is how I did it:

Normal conversion

console.log(dayjs('11-11-2018').format());
// output: 2018-11-11T00:00:00+08:00

UTC conversion

console.log(dayjs('11-11-2018', { utc: true, }).format());
// output: 2018-11-11T00:00:00+08:00

Both outputs are still showing in my timezone.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
iamkuncommented, Feb 22, 2020
4reactions
ghostcommented, Feb 27, 2019

@karlmosenbacher Will be avaliable in next version v1.8.9, maybe in two weeks I hope.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to translate UTC to your time - EarthSky
To convert 18:00 UTC (6:00 p.m.) into your local time, subtract 6 hours, to get 12 noon CST. During daylight saving (summer) time, ......
Read more >
How to convert UTC time to local time - Microsoft Support
To convert UTC to local time, follow these steps: Determine your local time offset from UTC time. To do this, follow these steps...
Read more >
UTC Time Zone Converter - Dateful
UTC Time Zone Converter converts times instantly as you type. Convert between major world cities, countries and timezones in both directions.
Read more >
(UTC/GMT) Time Zone Converter Difference Calculator
time zone difference converter lets you offer everyone an easy way to determine their own local time and date for your live event...
Read more >
UTC Converter - Savvy Time
Time conversion from Universal Time Coordinated (+0). UTC time zones converter, calculator, table and map.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found