Skip to main content

Datetime Conversion for the Command Line

  • Chapter
  • First Online:
Perl 6 Fundamentals
  • 1168 Accesses

Abstract

Occasionally I work with a database that stores dates and datetimes as UNIX timestamps, a.k.a. the number of seconds since midnight 1970-01-01. Unlike the original author of the database and surrounding code, I cannot convert between UNIX timestamps and human-readable date formats in my head, so I write tools for that.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://docs.perl6.org/type/DateTime

  2. 2.

    https://docs.perl6.org/type/Date

  3. 3.

    https://docs.perl6.org/type/IntStr

  4. 4.

    https://www.iso.org/iso-8601-date-and-time-format.html

  5. 5.

    https://docs.perl6.org/type/Junction

  6. 6.

    https://testanything.org/

  7. 7.

    http://testanything.org/testing-with-tap/perl.html

  8. 8.

    https://docs.perl6.org/language/testing

  9. 9.

    https://docs.perl6.org/routine/eqv

  10. 10.

    https://docs.perl6.org/language/control#with,_orwith,_without

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Moritz Lenz

About this chapter

Cite this chapter

Lenz, M. (2017). Datetime Conversion for the Command Line. In: Perl 6 Fundamentals . Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2899-9_4

Download citation

Publish with us

Policies and ethics