Local Time Zone - Wrong time in graphs!!!

Hey guys,

I need a help... I have the emoncms3 installed on my pc and he's running ok, but when the graphics are plot at dashboard their time seems to be wrong.

I mean, I live in Brazil and the official hour here is UTC/GMT - 3 hours. The problem is that i don't know where I can correct this in the code. Can someone help me to find out a solution?

Best regards,

Jonathas Rodrigues

TrystanLea's picture

Re: Local Time Zone - Wrong time in graphs!!!

Hello Jonathas, I think it should work now, jramer implemented a fix: https://github.com/openenergymonitor/emoncms3/pull/10

mharizanov's picture

Re: Local Time Zone - Wrong time in graphs!!!

Apologies, if I misunderstood, but the code you committed contains this:

 

+            if (opts.localTimezone===true) {

 

I think the triple === is a mistake, shouldn't it be == ?

 

Also, can you pls elaborat on how to activate the localTimezone option?

 

Thanks

TrystanLea's picture

Re: Local Time Zone - Wrong time in graphs!!!

3 equals is the strict equal operator and only returns a Boolean true if both the operands are equal and of the same type (http://www.devguru.com/technologies/ecmascript/quickref/comparison_operators.html)

localTimezone option is activated on line 69 of emoncms3/Vis/flot/inst.js

mharizanov's picture

Re: Local Time Zone - Wrong time in graphs!!!

Thanks Trystan, I learned something today :)

 

Sergegsx's picture

Re: Local Time Zone - Wrong time in graphs!!!

Thank you so much for this fix !! I have been having lots of trouble because of this.

btw, is there any place where it is described how to update emoncms3 to the latests branch version? I mean, its just as easy as deleting the folder and copying the new one? I remember this did not work from v2 to v3 but that could be due to a high amount of changes.

thanks all !!

TrystanLea's picture

Re: Local Time Zone - Wrong time in graphs!!!

there's a page on upgrading here: http://openenergymonitor.org/emon/emoncms/upgrading

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.