mercredi 11 avril 2018

Simulate different timezones in an Angular app with Firebase (Using Firestore)

In my angular 5 app, I have a factory entity that produces a fixed amount of resources with the help of a timer (each 10 sec, it produces 5 resources). When the factory has produced a pleasing amount of resources, the user can collect it and add this amount to his personal resources.

In firestore, I store/update the activation date and the last collect date using Date.now(). So when the user go to the factory view with the timer, I set the timer and compute the current production where it should be at this exact moment.

Everything work as intended but I would like to test my app in an other timezone to see how it reacts. For instance, If I activate my factory at utc +1 then switch to a utc +5 timezone, I don't want a production boost in my factory.

Is there an effective way in Firebase/firestore (or any tool) to test an app in a different timezone in order to control this case? (any good advices on that topic is also welcome).

Aucun commentaire:

Enregistrer un commentaire