question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow emulators to select TimeZone

See original GitHub issue

When I emulate my cloud functions it uses my local time zone. It would be great to run emulators by setting the TimeZone I’d like to, in order to test the system as it can be in production (I’m most interested in testing cloud functions with UTC locale set, as I think that actually firebase uses UTC in the containers and not the region locale, right ? ).

Something like: firebase emulators:start --tz='UTC' firebase emulators:start --tz='Europe/Amsterdam' or other format.

I tried to use (in node.js) process.env.TZ = 'UTC' and it worked, so I was wondering if could be possible to have an environment variable like that one that can be changed by param.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
samtsterncommented, May 20, 2020

@emanuelevivoli ok I think we’re on the same page. Once I find out what production behavior is I will make sure the emulators automatically match that.

1reaction
samtsterncommented, May 20, 2020

But if I set TZ=UTC it works better locally:

$ TZ=UTC firebase functions:shell
i  functions: Loaded functions: checkTimeZone
⚠  functions: The following emulators are not running, calls to these services will affect production: firestore, database, pubsub
firebase > checkTimeZone()
Sent request to function.
firebase > >  {"tz":"UTC","time":"15:56:16 GMT+0000 (Coordinated Universal Time)","offset":0}

RESPONSE RECEIVED FROM FUNCTION: 200, {
  "tz": "UTC",
  "time": "15:56:16 GMT+0000 (Coordinated Universal Time)",
  "offset": 0
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

timezone in android emulator - Stack Overflow
Menu - Settings - Date & Time - Select time zone is grey and can't be changed, Set time and Set date is...
Read more >
How to change Time Zone in Chrome for Testing | BrowserStack
Method 1: Using Developer Tools to Change Chrome Timezone​​ To change the Chrome time zone for testing, follow the steps below: Open DevTools...
Read more >
Location Time Zone Detection | Android Open Source Project
A user-accessible option in Settings, introduced in Android 12, to enable users to select between the telephony and location time zone detection ...
Read more >
How To Change Time Zone on Xbox Series S | Full Tutorial
If you enjoy this content, please consider a paid "super thanks" in the video or becoming a "member": ...
Read more >
How to Change Time Zone on Xbox Series S and X! - YouTube
Hey, guys, my name is Scoby Tech and in today's video I am going to be showing you how to change the timezone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found