How to convert to UTC?
See original GitHub issueI 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:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, please check.
https://day.js.org/docs/en/parse/utc
@karlmosenbacher Will be avaliable in next version v1.8.9, maybe in two weeks I hope.