Since java.util.Date is mostly deprecated, what’s the right way to get a timestamp for a given date, UTC time? The one that could be compared against System.currentTimeMillis().
Since java.util.Date is mostly deprecated, what’s the right way to get a timestamp for
Share
Using the Calendar class you can create a time stamp at a specific time in a specific timezone. Once you have that, you can then get the millisecond time stamp to compare with:
edit: changed to use more direct method to get time in milliseconds from Calendar instance. Thanks Outlaw Programmer