Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set UTC offset for datetime?

Tags:

People also ask

How do I set UTC offset?

utcOffset(); // (-240, -120, -60, 0, 60, 120, 240, etc.) Setting the UTC offset by supplying minutes. The offset is set on the moment object that utcOffset() is called on. If you are wanting to set the offset globally, try using moment-timezone.


My Python-based web server needs to perform some date manipulation using the client's timezone, represented by its UTC offset. How do I construct a datetime object with the specified UTC offset as timezone?