0

I have one question about the browser timezone. I notice that my system's date and time will be affected by my computer's timezone setting.

let's say I have created one data in the database

{ item_name: 'A', created_time: '2022-06-06T06:42:12.933+0000' }

if my timezone is Singapore, the time will show as 6-Jun-22 2:42 pm in my browser

But when I change my timezone to Fiji, the time will show as 6-Jun-22 6:42 pm in my browser

So, how do to prevent this issue?

Thank you

Alan Tang
  • 31
  • 9
  • 1
    https://stackoverflow.com/questions/2771609/how-to-ignore-users-time-zone-and-force-date-use-specific-time-zone perhaps? I'd argue this might break user's expectation though – Martheen Jun 06 '22 at 07:28
  • `"...the time will show as 6-Jun-22 2:42 pm in my browser"` - That depends entirely on how *you* decide to create and display it, which you didn't show any code for here. Please read [*How do I ask a good question?*](https://stackoverflow.com/help/how-to-ask), and [*How to create a Minimal, Reproducible Example*](https://stackoverflow.com/help/minimal-reproducible-example). Thank you. – Matt Johnson-Pint Jun 06 '22 at 13:57

0 Answers0