Quiq::Epoch - Ein Zeitpunkt
Quiq::Object
Anzahl der Sekunden seit 1.1.1970, 0 Uhr UTC in hoher Auflösung, also mit Nachkommastellen.
Ein Objekt der Klasse repräsentiert einen Zeitpunkt. Die Klasse implementiert Operationen auf einem solchen Zeitpunkt. Der Zeitpunkt ist hochauflösend, umfasst also auch Sekundenbruchteile.
$t = $class->new; $t = $class->new($epoch);
Instantiiere ein Zeitpunkt-Objekt für Epoch-Wert $epoch und liefere dieses zurück. Ist kein Epoch-Wert angegeben, wird der aktuelle Zeitpunkt genommen.
$epoch = $t->epoch;
Liefere den Epoch-Wert des Zeitpunkts.
Quiq::Epoch->new->epoch; => 1464342621.73231
$str = $t->as($fmt);
Liefere eine externe Repräsentation gemäß Formatangabe $fmt. Der Zeitpunkt wird in der lokalen Zeitzone interpretiert.
Quiq::Epoch->new->as('YYYY-MM-DD HH:MI:SS'); => 2016-05-27 11:50:21
1.138
Frank Seitz, http://fseitz.de/
Copyright (C) 2019 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.