Converting SQUIDs back to timestamps and dates/times
Source:R/squids_to_datetime.R, R/squids_to_timestamp.R
unsquiding.Rdsquids_to_timestamp() converts a SQUID back to a timestamp (the number
of seconds that passed since the UNIC Epoch, 1970-01-01, 00:00:00 UTC), and
squids_to_datetime(), squids_to_origin(), squids_to_POSIXt() convert a
SQUID to a POSIX time object (which is why they also have a tz argument).
Examples
exampleSQUID <-
squids::squids();
### Timestamp (second since UNIX Epoch,
### 1970-01-01, 00:00:00 UTC)
squids::squids_to_timestamp(
exampleSQUID
);
#> [1] 1771623454
squids::squids_to_datetime(
exampleSQUID
);
#> [1] "2026-02-20 21:37:34 UTC"
### In Central European Time
squids::squids_to_datetime(
exampleSQUID,
tz = "CET"
);
#> [1] "2026-02-20 22:37:34 CET"