{"action":"created","issue":{"url":"https://api.github.com/repos/TooTallNate/node-time/issues/98","repository_url":"https://api.github.com/repos/TooTallNate/node-time","labels_url":"https://api.github.com/repos/TooTallNate/node-time/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/TooTallNate/node-time/issues/98/comments","events_url":"https://api.github.com/repos/TooTallNate/node-time/issues/98/events","html_url":"https://github.com/TooTallNate/node-time/issues/98","id":177963316,"number":98,"title":"error C2065: 'tzname': undeclared identifier issue on Windows with VS2015","user":{"login":"Hassnain-Raza-Alvi","id":20231385,"avatar_url":"https://avatars.githubusercontent.com/u/20231385?v=3","gravatar_id":"","url":"https://api.github.com/users/Hassnain-Raza-Alvi","html_url":"https://github.com/Hassnain-Raza-Alvi","followers_url":"https://api.github.com/users/Hassnain-Raza-Alvi/followers","following_url":"https://api.github.com/users/Hassnain-Raza-Alvi/following{/other_user}","gists_url":"https://api.github.com/users/Hassnain-Raza-Alvi/gists{/gist_id}","starred_url":"https://api.github.com/users/Hassnain-Raza-Alvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hassnain-Raza-Alvi/subscriptions","organizations_url":"https://api.github.com/users/Hassnain-Raza-Alvi/orgs","repos_url":"https://api.github.com/users/Hassnain-Raza-Alvi/repos","events_url":"https://api.github.com/users/Hassnain-Raza-Alvi/events{/privacy}","received_events_url":"https://api.github.com/users/Hassnain-Raza-Alvi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T04:48:45Z","updated_at":"2016-10-05T13:13:58Z","closed_at":null,"body":"Hi i am installing time package on Visual studio with NPM but it is failing and raising following errors \r\n```\r\n\r\nBuilding the projects in this solution one at a time. To enable parallel build, please add the \"/m\" switch.\r\n time.cc\r\n win_delay_load_hook.cc\r\n..\\src\\time.cc(46): error C2065: 'tzname': undeclared identifier [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\n..\\src\\time.cc(46): error C2228: left of '.ToLocalChecked' must have class/struct/union [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\n..\\src\\time.cc(46): error C2661: 'Nan::Set': no overloaded function takes 2 arguments [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\n..\\src\\time.cc(52): error C2065: 'timezone': undeclared identifier [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\n..\\src\\time.cc(52): error C2661: 'Nan::Set': no overloaded function takes 2 arguments [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\n..\\src\\time.cc(56): error C2065: 'daylight': undeclared identifier [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\n..\\src\\time.cc(56): error C2661: 'Nan::Set': no overloaded function takes 2 arguments [D:\\Abode Nodejs\\nodejs\\node_modules\\time\\build\\time.vcxproj]\r\ngyp ERR! build error\r\ngyp ERR! stack Error: `msbuild` failed with exit code: 1\r\ngyp ERR! stack     at ChildProcess.onExit (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\build.js:276:23)\r\ngyp ERR! stack     at emitTwo (events.js:87:13)\r\ngyp ERR! stack     at ChildProcess.emit (events.js:172:7)\r\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)\r\ngyp ERR! System Windows_NT 10.0.10240\r\ngyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\"\r\ngyp ERR! cwd D:\\Abode Nodejs\\nodejs\\node_modules\\time\r\ngyp ERR! node -v v4.4.6\r\ngyp ERR! node-gyp -v v3.4.0\r\ngyp ERR! not ok\r\nnpm ERR! Windows_NT 10.0.10240\r\nnpm ERR! argv \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\" \"install\"\r\nnpm ERR! node v4.4.6\r\nnpm ERR! npm  v3.10.7\r\nnpm ERR! code ELIFECYCLE\r\n\r\nnpm ERR! time@0.11.4 install: `node-gyp rebuild`\r\nnpm ERR! Exit status 1\r\nnpm ERR!\r\nnpm ERR! Failed at the time@0.11.4 install script 'node-gyp rebuild'.\r\nnpm ERR! Make sure you have the latest version of node.js and npm installed.\r\nnpm ERR! If you do, this is most likely a problem with the time package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node-gyp rebuild\r\nnpm ERR! You can get information on how to open an issue for this project with:\r\nnpm ERR!     npm bugs time\r\nnpm ERR! Or if that isn't available, you can get their info via:\r\nnpm ERR!     npm owner ls time\r\nnpm ERR! There is likely additional logging output above.\r\n```\r\n\r\nI am using Windows 10 with VS 2015 and all node-gyp dependencies installed. Everything else is working except the time package "},"comment":{"url":"https://api.github.com/repos/TooTallNate/node-time/issues/comments/251670526","html_url":"https://github.com/TooTallNate/node-time/issues/98#issuecomment-251670526","issue_url":"https://api.github.com/repos/TooTallNate/node-time/issues/98","id":251670526,"user":{"login":"jessegranger","id":22503710,"avatar_url":"https://avatars.githubusercontent.com/u/22503710?v=3","gravatar_id":"","url":"https://api.github.com/users/jessegranger","html_url":"https://github.com/jessegranger","followers_url":"https://api.github.com/users/jessegranger/followers","following_url":"https://api.github.com/users/jessegranger/following{/other_user}","gists_url":"https://api.github.com/users/jessegranger/gists{/gist_id}","starred_url":"https://api.github.com/users/jessegranger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessegranger/subscriptions","organizations_url":"https://api.github.com/users/jessegranger/orgs","repos_url":"https://api.github.com/users/jessegranger/repos","events_url":"https://api.github.com/users/jessegranger/events{/privacy}","received_events_url":"https://api.github.com/users/jessegranger/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T13:13:58Z","updated_at":"2016-10-05T13:13:58Z","body":"Same problem. Windows 10 64-bit, VS 2015. Same series of errors.\r\n\r\nhttps://msdn.microsoft.com/en-us/library/htb3tdkc.aspx\r\n\r\nThe tzname, timezone, and daylight globals used in src/time.cc are prefixed with an underscore in this build configuration.\r\n\r\nJust changing these allowed it to build (with the latest node-gyp, 3.4.0 at this time).\r\n\r\n    diff --git a/src/time.cc b/src/time.cc\r\n    index 93889b9..e7802c0 100644\r\n    --- a/src/time.cc\r\n    +++ b/src/time.cc\r\n    @@ -43,17 +43,17 @@ class Time {\r\n         int tznameLength = 2;\r\n         Local<Array> tznameArray = Nan::New<v8::Array>( tznameLength );\r\n         for (int i=0; i < tznameLength; i++) {\r\n    -      Nan::Set(tznameArray, i, Nan::New<v8::String>(tzname[i]).ToLocalChecked());\r\n    +      Nan::Set(tznameArray, i, Nan::New<v8::String>(_tzname[i]).ToLocalChecked());\r\n         }\r\n    \r\n         Nan::Set(obj, Nan::New(\"tzname\").ToLocalChecked(), tznameArray);\r\n    \r\n         // The 'timezone' long is the \"seconds West of UTC\"\r\n    -    Nan::Set(obj, Nan::New(\"timezone\").ToLocalChecked(), Nan::New<v8::Number>( timezone ));\r\n    +    Nan::Set(obj, Nan::New(\"timezone\").ToLocalChecked(), Nan::New<v8::Number>( _timezone ));\r\n    \r\n         // The 'daylight' int is obselete actually, but I'll include it here for\r\n         // curiosity's sake. See the \"Notes\" section of \"man tzset\"\r\n    -    Nan::Set(obj, Nan::New(\"daylight\").ToLocalChecked(), Nan::New<v8::Number>( daylight ));\r\n    +    Nan::Set(obj, Nan::New(\"daylight\").ToLocalChecked(), Nan::New<v8::Number>( _daylight ));\r\n    \r\n         info.GetReturnValue().Set(scope.Escape(obj));\r\n       }\r\n"}}
{"actor":{"display_login":"jessegranger"}}