rawToAmigaDate {adfExplorer} | R Documentation |
Convert raw values into a date time object
Description
This function converts raw data into a date time object conform the Amiga file system specifications.
Usage
rawToAmigaDate(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 amigaDateToRaw
.
Value
Returns a POSIXct
object based on the provided
raw data.
Author(s)
Pepijn de Vries
See Also
Other raw.operations:
amigaDateToRaw()
,
amigaIntToRaw()
,
displayRawData()
,
rawToAmigaInt()
,
rawToBitmap()
Examples
## all raw data is zero, so the origin date is returned:
rawToAmigaDate(raw(12))
## let's get the date, one day, one minute and 50 ticks from the origin:
rawToAmigaDate(amigaIntToRaw(c(1, 1, 50), 32))