in fact localtime is correct if server admin runs server in GMT
Revert "#441 change localtime to gmtime"
This reverts commit 779e0a618d.
			
			
This commit is contained in:
		| @@ -27,7 +27,7 @@ sub worker_body { | ||||
|       next unless defined $job; | ||||
|  | ||||
|       try { | ||||
|           $job->started(scalar gmtime); | ||||
|           $job->started(scalar localtime); | ||||
|           prctl sprintf 'nd2: #%s poll: #%s: %s', | ||||
|             $wid, $job->id, $job->display_name; | ||||
|           info sprintf "pol (%s): starting %s job(%s) at %s", | ||||
| @@ -48,7 +48,7 @@ sub worker_body { | ||||
|  | ||||
| sub close_job { | ||||
|   my ($self, $job) = @_; | ||||
|   my $now  = scalar gmtime; | ||||
|   my $now  = scalar localtime; | ||||
|  | ||||
|   info sprintf "pol (%s): wrapping up %s job(%s) - status %s at %s", | ||||
|     $self->wid, $job->action, $job->id, $job->status, $now; | ||||
|   | ||||
| @@ -62,7 +62,7 @@ Creates netmap of network. | ||||
| sub graph { | ||||
|     my %CONFIG = %{ setting('graph') }; | ||||
|  | ||||
|     my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(); | ||||
|     my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); | ||||
|     my $month = sprintf("%d%02d",$year+1900,$mon+1); | ||||
|  | ||||
|     info "graph() - Creating Graphs"; | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package App::Netdisco::Util::Statistics; | ||||
| use Dancer qw/:syntax :script/; | ||||
| use Dancer::Plugin::DBIC 'schema'; | ||||
|  | ||||
| use Time::Piece; # for OO gmtime | ||||
| use Time::Piece; # for OO localtime | ||||
|  | ||||
| use base 'Exporter'; | ||||
| our @EXPORT = (); | ||||
| @@ -40,7 +40,7 @@ sub update_stats { | ||||
|  | ||||
|   $schema->txn_do(sub { | ||||
|     $schema->resultset('Statistics')->update_or_create({ | ||||
|       day => gmtime->ymd, | ||||
|       day => localtime->ymd, | ||||
|  | ||||
|       device_count => | ||||
|         $schema->resultset('Device')->count_rs->as_query, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user