Anzak icon

Date with time reset

Anzak | PRO | 10/04/16 01:11:45 PM UTC | 0 ⭐ | 207 👁️ | Never ⏰ | []
Java |

230 B

|

None

|

0 👍

/

0 👎

    static final long day = 1000 * 60 * 60 * 24;
    
    Date date = new Date();
    long current = date.getTime();
    current = current - (current % day) - TimeZone.getDefault().getRawOffset();
    System.out.println(new Date(current));

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎