• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 312
  • Last Modified:

Get time at beginning of a GMT day

$secondsSinceEpoch = 1353324514;

# How to get the time (in seconds) at the beginning of the next GMT day from the $secondsSinceEpoch
0
rgbcof
Asked:
rgbcof
1 Solution
 
ozoCommented:
use Time::Local 'timegm_nocheck';
@dmy=(gmtime $secondsSinceEpoch)[3..5];
++$dmy[0];
print timegm_nocheck(0,0,0,@dmy);
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now