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,156
  • 70
  • 93
  • 127
Victor
  • 15,903
  • 67
  • 211
  • 390

2 Answers2

0

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

Garrett Hall
  • 28,716
  • 10
  • 59
  • 74
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,156
  • 70
  • 93
  • 127