TL;DR
As clouds passing by over your head, so the time passes through your product under test. Time is important testing variable that is often overlooked as source of test ideas. Reason for that is that testers do not have appropriate tools to help them test time variable. I will provide simple example how docker can help us.
In my previous posts SIMULATING TIME IN RUBY ON RAILS and TESTING WITH TIME VARIABLE IS FUN! I already discussed time variable.
When you manage to learn docker basics, you are able to run on your local development machine various version of linux instances and services (nginx, apache, mysql) in matter of seconds.
But you can control various variables of linux instances, not just product versions. And yes, you can control time variable. Time variable has several attributes: format, value, zone. And docker provides easy and SAFE way to change values of those attributes. Changing those values means that you only need to reboot your docker container. And if something breaks, you can have again old values in matter of seconds (all configuration variables are written in file that you can easily put under git control).
Here is example how to set docker container time ZONE. Changing time zone is important because in today’s web application world, frontend side application (javascript in browser) and backend application (Django, Rails, Node,…) usually have different time zones.
Create docker-compose.yml:
db: image: mysql:5.7 environment: TZ: UTC
and from that folder run:
>docker-compose up -d
No need to know how to actually set timezone in linux (Am I using bash or sh?), docker takes care of this. Your mysql instance is running in UTC time zone!