4

The America/New_York timezone is called EST in winter and EDT(in summer). Now my java program has a page that displays current time with the time zone as EDT.

To test the winter scenario, is there any way to manipulate the computer settings to simulate a winter scenario? Just to see if for a winter time, it displays EST proeprly?

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
Victor
  • 16,609
  • 71
  • 229
  • 409

2 Answers2

0

Dependency inject the current time by passing it into your display.

Garrett Hall
  • 29,524
  • 10
  • 61
  • 76
0

For unittesting its not recommended to manipulate the system datetime, there are some workarounds to test date time based logic part.

Take alook at these threads:

Community
  • 1
  • 1
CloudyMarble
  • 36,908
  • 70
  • 97
  • 130