4 changed files with 56 additions and 0 deletions
@ -0,0 +1,29 @@ |
|||
package bc.mm.mis.core.utils; |
|||
|
|||
import java.util.TimeZone; |
|||
|
|||
/** |
|||
* USA timd format utils |
|||
*/ |
|||
public class UsTimeUtils { |
|||
|
|||
/** |
|||
* get us date&time |
|||
* @return |
|||
*/ |
|||
public static void getUsDateTime(){ |
|||
// get time zone
|
|||
TimeZone defaultZone = TimeZone.getDefault(); |
|||
System.out.println("default time zone :"+defaultZone); |
|||
//
|
|||
TimeZone nyzone = TimeZone.getTimeZone("America/New_York"); |
|||
//
|
|||
int dsDiff = nyzone.getDSTSavings(); |
|||
System.out.println("daylight saving time offset:"+dsDiff); |
|||
// curent timestamp
|
|||
long currentTimeMillis = System.currentTimeMillis(); |
|||
int offset = nyzone.getOffset(currentTimeMillis); |
|||
//
|
|||
System.out.println("current offset :"+offset); |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
package bc.mm.mis.core.dao; |
|||
|
|||
import org.junit.jupiter.api.Test; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
|
|||
import static org.junit.jupiter.api.Assertions.*; |
|||
|
|||
@SpringBootTest |
|||
class CoinsDaoTest { |
|||
|
|||
@Test |
|||
void findAll() { |
|||
} |
|||
} |
|||
Loading…
Reference in new issue