Cloud native development - Timezones


When developing Cloud Native applications, we need to think the way we write our code to adapt to the new challenges coming with Cloud Architectures. Like re-assess the way we start-up, shutdown the apps or the way apps scale out and interact with each other, in a distributed environment. Machines are physically distributed across the world even though we keep forgetting this particular detail. The Problem with time zones is the following: If we store a date with no time zone specified how do we know where that date is being created? How do we later interpret that piece of information to represent a date a and time correctly? Generally speaking if we create a date on a UK based server, the date will default to system’s own timezone. So we need to ensure a timezone information is also stored alongside the timestamp, otherwise we run the risk of inaccuracies and bugs having wrong time zones conversions whenever parsing dates takes place.