GithubHelp home page GithubHelp logo

Comments (2)

jaxxstorm avatar jaxxstorm commented on May 24, 2024

The error thrown is here:

ERROR TypeError: Cannot call method 'getTimezoneOffset' of undefined
  at Tempus.setTimezoneToLocale (/opt/opsbot/node_modules/hubot-logger/node_modules/Tempus/tempus.js:538:45)
  at Tempus.set (/opt/opsbot/node_modules/hubot-logger/node_modules/Tempus/tempus.js:263:18)
  at new Tempus (/opt/opsbot/node_modules/hubot-logger/node_modules/Tempus/tempus.js:34:18)
  at parse_events (/opt/opsbot/node_modules/hubot-logger/scripts/hubot-logger.coffee:70:7, <js>:74:22)
  at ReadStream.<anonymous> (/opt/opsbot/node_modules/hubot-logger/scripts/hubot-logger.coffee:87:5, <js>:94:7)
  at ReadStream.EventEmitter.emit (events.js:117:20)
  at _stream_readable.js:919:16
  at process._tickCallback (node.js:419:13)

It looks like the issue might be caused by this: https://github.com/adragomir/hubot-logger/blob/master/scripts/hubot-logger.coffee#L86

But I don't know enough JS/coffeescript to debug it

from hubot-logger.

wamaral avatar wamaral commented on May 24, 2024

The file size is not the problem here, I traced back the error to the way the Tempus library is storing timestamps close to midnight. Here is an example:

The following entry was generated on 23:35:58 at GMT-3, however it is stored as -1:35:58 (i.e. 1 hour until midnight)

{"nick":"AndreSenaubar","reason":"Ping timeout: 20 seconds","date":"2015-03-12T-1:35:58.049-0300","channel":"#musashi","type":"quit"}

For me, since I am on GMT-3, it affects all entries generated between 21:00:00 and 23:59:59

Here is an entry from the same logfile, before 9pm, generated correctly:

{"nick":"jenkins-musashi","reason":"Ping timeout: 20 seconds","date":"2015-03-12T20:50:31.521-0300","channel":"#musashi","type":"quit"}

Note how the time was stored correctly as 20:50:31, because it is more than 3 hours from GMT

I see the development of the Tempus library is halted and the author is not accepting pull requests, so I would advise @adragomir to consider switching libraries

from hubot-logger.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.