[Answer]-How to communicate time data between different zone?

1👍

This is not the best way to handle timezones.

The best way is to convert times to UTC as early as possible and convert them back as late as possible.

In other words, if I enter the current time here as Feb 11, 21:03, it should never be stored like that. Instead it should be changed to UTC before anything else happens.

That’s so, no matter what happens with it, it’s correct. If I send it to Inner Mongolia, it should stay as UTC right up until the point someone wants to look at it. Then and only then should it be converted (and for display only).

Following that rule will save you a lot of grief in any software that has to work across multiple timezones. Trust me on that, we fixed a major Telco up after they’d implemented some hideous system that sent timezones across the wire, meaning that every point had to be able to convert to and from every timezone.

Getting them into UTC as quickly as possible, and only getting them back on demand, saved bucketloads of time and money.

Leave a comment