Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Original TZ is not restored if tzset() throws #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rlidwka
Copy link

@rlidwka rlidwka commented Sep 5, 2012

So after an error current timezone would be in invalid state:

> var date = new (require('time').Date)()
undefined

> date.setTimezone('WTF')
Error: Unknown Timezone: 'WTF'
    at Function.tzset (/home/alex/broadsend/node_modules/time/index.js:150:15)
    at Date.setTimezone (/home/alex/broadsend/node_modules/time/index.js:252:19)

> new Date()
Wed Sep 05 2012 21:38:06 GMT+0000 (WTF)

PS: if I try to use this module with an arbitrary user-supplied data, will I have any security problems here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant