Skip to content
Browse files

check that the `tz` variable is set in setTimezone()

Attempting to fix #16.
  • Loading branch information...
1 parent 92ce475 commit d9e605fc878550e014e01361a0aed53fc29d8088 @TooTallNate committed Apr 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
2 index.js
@@ -236,7 +236,7 @@ function setTimezone (timezone, relative) {
// tzset() to change the current timezone of the process.
var oldTz = exports.currentTimezone
, tz = exports._currentZoneinfo;
- if (oldTz != timezone) {
+ if (!tz || oldTz !== timezone) {
debug('current timezone is not "%s", calling tzset()', timezone);
tz = exports.tzset(timezone);
}

1 comment on commit d9e605f

@voodootikigod

fixes for me! thanks.

Please sign in to comment.
Something went wrong with that request. Please try again.