Timezone does nothing
See original GitHub issueI 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:
- Created 2 years ago
- Reactions:1
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sry guys, I have to partially correct my statement. The timezone does work, but simply printing the triggerdate does not get the correct timezone
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