Each country has different style and formats for
  • Date and time
  • Currency
  • Money
  • locale
  • language
  • Telephone and mobile
  • Paper sizes
  • addresses - postal codes
  • Metrics - e.g. gallon, litre etc
  • Holidays
  • Documents - TIN, PAN, Passport, Driving License etc
  • title - Mr, Mrs, Shree etc

Date and time

In USA, date format is mm-dd-yyyy. But in India and Australia, it is dd-mm-yyyy. So if you are working on a software that will be used by people from all over the world, you need to be careful about the format. To avoid confusion, date formats has been standardized with ISO 8601.

ISO 8601 uses Gregorian calendar. So the format is YYYY-MM-DDThh:mm:ss.sss+-UTC_TimeZone_offset and it uses 24 hour time format.

There are 3 parts to the ISO format.
  • Date - YYYY-MM-DD
  • Time - Thh:mm:ss.sss - Here T stands for Time part
  • Time Zone Offset - If offset is 0000, it means time is for GMT/UTC/ZULU. If offset is +1000, it means time is for AEST. UTC is same as Z (zulu time or GMT time). So if format contains letter Z or UTC, it means the time is a GMT. Once you know GMT time, it's pretty easy to calculate the time of any city using offsets. A same city can have different timezones due to daylight savings. e.g. Sydney has 2 timezones - AEST UTC+10h and AEDT UTC+11h.
In below example, first timestamp is in UTC format because Z is at the end of timestamp. Second timestamp is in ISO-8601 format. Since zulu timestamp has offset of 0 from GMT, we have specified +0000 at the end.

UTC format      

ISO-8601 format

Complex problems, Simple Solutions