aboutsummaryrefslogtreecommitdiff
path: root/examples/08-datetime.php
blob: 23ae41bdc56e2e058ecd756e0acfd4e279d77926 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
declare(strict_types = 1);

require_once __DIR__ . '/../src/ZipStream.php';

# import classes
use Pablotron\ZipStream\DateTime;

# create DateTime with current timestamp
$dt = new DateTime(time());

# print DOS date and time
echo "UNIX time: {$dt->time}\n";
echo "DOS time: {$dt->dos_time}\n";
echo "DOS date: {$dt->dos_date}\n";