1

i write a functions that sync data every day using cloud functions.pubsub.schedule, and just to to know what is the time zone for Israer or i just wrote Israel?

exports.scheduledFunctionCrontab = functions.pubsub.schedule('0 6 * * *')
   .timeZone('Israel') 
  .onRun(async(context) => {

just want to know if it support tiime zone in israel like that

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
koby
  • 73
  • 2
  • 6
  • Hi, welcome to stackoverflow, please take a minute to read stackoverflow.com/help/how-to-ask – peco Oct 06 '19 at 07:37
  • i just want to know what to write in timezone to get Israel time – koby Oct 06 '19 at 07:44
  • Check this https://stackoverflow.com/questions/10087819/convert-date-to-another-timezone-in-javascript – peco Oct 06 '19 at 08:01

1 Answers1

8

The time zone names used to schedule a Scheduled Cloud Function are the ones of the tz database. You will find a list of all possible values in this Wikipedia page, in the third column of the table.

So, for Israel it should be Asia/Jerusalem.

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
  • 4
    Its old, but was my first result on google, so worth to mention that default TZ is `America/Los_Angeles` - https://firebase.google.com/docs/functions/schedule-functions – Neuber Oliveira Nov 10 '21 at 18:19