Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
277 B

  1. #!/usr/bin/env perl
  2. use warnings;
  3. use strict;
  4. use 5.10.0;
  5. use Time::Piece;
  6. my $specific_time = Time::Piece->strptime('2020-11-06 20:20:01', "%Y-%m-%d %T");
  7. say $specific_time;
  8. my $now = localtime();
  9. say $now->epoch;
  10. my $hour_ago = localtime()->epoch - 3600;
  11. say $hour_ago;