amigaDateToRaw {adfExplorer} | R Documentation |
Convert date time objects into raw values
Description
This function converts date-time objects into raw data conform Amiga file system specifications.
Usage
amigaDateToRaw(x, format = c("long", "short"), tz = "UTC")
Arguments
x |
A ( |
format |
a |
tz |
A |
Details
The Amiga file system stores date time objects as three unsigned short (16 bit) or long (32 bit) integers. Where the values are number of days, minutes and ticks (fiftieth of a second) since 1978-01-01 respectively.
As these values are always positive, only date time values on or after
1978-01-01 are allowed. The inverse of this function can be achieved
with rawToAmigaDate
.
Value
returns raw
data reflecting the date-time objects conform
the Amiga file system specifications.
Author(s)
Pepijn de Vries
See Also
Other raw.operations:
amigaIntToRaw()
,
displayRawData()
,
rawToAmigaDate()
,
rawToAmigaInt()
,
rawToBitmap()
Examples
## Note that using the same date-time with different timezones will
## result in different raw data. The time zone is not stored.
amigaDateToRaw(as.POSIXct("1978-01-01 13:30", tz = "UTC"))
amigaDateToRaw(as.POSIXct("1978-01-01 13:30", tz = "CET"))