Knowledgebase

Handling Time Zones for Local Users Print

  • phplaravel, woocommerce, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Time in practice.

WHAT TO SET

The application's time zone explicitly.

WHAT TO STORE

A consistent standard, converting at display.

WHY

Storing local times without zone information cannot be resolved later.

WHAT TO CONSIDER

Whether all your users are in one zone.

For a business serving one country, that simplifies matters considerably.

WHAT TO DO IF THEY ARE NOT

Store a zone per user, and convert for each.

WHAT TO BE CAREFUL WITH

Scheduled tasks, which run in the server's zone Date boundaries, where a day differs between zones Comparisons between values in different zones

THE DATE BOUNDARY POINT

A report covering today means different periods in different zones.

Define which zone a report uses, and state it.

WHAT TO DISPLAY

Times with a clear indication of the zone, where ambiguity exists.

WHAT TO TEST

Behaviour around midnight Scheduled tasks running at the intended local time


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot