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.

Timezone does nothing

See original GitHub issue

I am in the timezone ‘Europe/Berlin’ and no matter what timezone I s et it gets ignored.

Lets say it is 16:00 (4:00pm) and printing the time every 15 seconds shows that the library thinks it is 14:00 (2:00pm). My system timezone is set correctly.

Maybe I am making a misstake, so here is my relevant code rn:

const schedule = require('node-schedule');


const job = schedule.scheduleJob({rule: '*/15 * * * * *', tz: 'Europe/Berlin'}, (date) => {
    console.log(date);
});

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
NeoCortex97commented, Jun 18, 2021

Sry guys, I have to partially correct my statement. The timezone does work, but simply printing the triggerdate does not get the correct timezone

1reaction
anuragme7commented, Jan 10, 2022

I have also used this particular code only -

schedule.scheduleJob(‘JobName’,{rule: ‘0 50 16 * * *’, tz: timeZone, function() { // Logic });

Here timeZone is my browser time-zone, getting calculated by getTZguess() method from my front-end. But the tz attribute doesn’t seem to work. The job runs on one particular time only i.e. 4:50 pm daily. Not respective to the timezone that has been mentioned. I am assuming that the cron expression is considered UTC and then the timezone is applied on it.

Is it possible to bring out the above requirement from this package. Please share any information available

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot change timezone in Windows 10 - Microsoft Community
I cannot change the timezone in Windows10. It's stuck in Pacific Standard Time. I select Eastern Standard Time and it reverts back to...
Read more >
Fix For the Set Time Zone Automatically Greyed Out Issue in ...
Your browser can 't play this video. Learn more. Switch camera.
Read more >
Time zone does not update automatically - Apple Community
Go to Settings/General/Date & Time and make sure you have Set Automatically turned on. Also go to Settings/Privacy/Location Services. Make sure ...
Read more >
Why won't my timezone changes be reflected in the date ...
I have fixed the problem. There was nothing wrong with what I did. Everything was right the whole time. The issue was with...
Read more >
Unable to change the time zone in Windows 10 - Super User
Windows 10 Home can get in a state where it requires admin to change the time zone, even though there's no group policy....
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