Skip to content

Commit

Permalink
[HWKMETRICS-52] use UTC time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
John Sanda committed May 12, 2015
1 parent 325d01c commit d4210e5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.joda.time.DateTime.now;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.Days;
import org.joda.time.Duration;
import org.joda.time.Hours;
Expand All @@ -29,6 +30,11 @@
*/
public class DateTimeService {

static {
// Force the timezone to UTC to avoid any problems due to transitions from DST to non-DST
DateTimeZone.setDefault(DateTimeZone.UTC);
}

/**
* @return A DateTime object rounded down to the start of the current hour. For example, if the current time is
* 17:21:09, then 17:00:00 is returned.
Expand Down

0 comments on commit d4210e5

Please sign in to comment.