aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_tar.hrl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-05-29 10:45:13 +0200
committerGitHub <[email protected]>2017-05-29 10:45:13 +0200
commit6ebe1a85f0ae97b383a9c1fa838b4e9f9a808e21 (patch)
tree0b108ea619ef0d18e98aec6f98d86aa1e19c6f88 /lib/stdlib/src/erl_tar.hrl
parent96431965fc60f9da1d64c1aaa3861896b6a73ba7 (diff)
parent7fbda5f4bb33776758bf7e3a31d8ee6ee2aa46db (diff)
downloadotp-6ebe1a85f0ae97b383a9c1fa838b4e9f9a808e21.tar.gz
otp-6ebe1a85f0ae97b383a9c1fa838b4e9f9a808e21.tar.bz2
otp-6ebe1a85f0ae97b383a9c1fa838b4e9f9a808e21.zip
Merge pull request #1476 from bjorng/bjorn/stdlib/erl_tar-times
erl_tar: Fix handling of date and time
Diffstat (limited to 'lib/stdlib/src/erl_tar.hrl')
-rw-r--r--lib/stdlib/src/erl_tar.hrl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stdlib/src/erl_tar.hrl b/lib/stdlib/src/erl_tar.hrl
index d646d02989..cff0c2f500 100644
--- a/lib/stdlib/src/erl_tar.hrl
+++ b/lib/stdlib/src/erl_tar.hrl
@@ -55,6 +55,8 @@
{string(), binary()} |
{string(), file:filename()}].
+-type tar_time() :: non_neg_integer().
+
%% The tar header, once fully parsed.
-record(tar_header, {
name = "" :: string(), %% name of header file entry
@@ -62,15 +64,15 @@
uid = 0 :: non_neg_integer(), %% user id of owner
gid = 0 :: non_neg_integer(), %% group id of owner
size = 0 :: non_neg_integer(), %% length in bytes
- mtime :: calendar:datetime(), %% modified time
+ mtime :: tar_time(), %% modified time
typeflag :: char(), %% type of header entry
linkname = "" :: string(), %% target name of link
uname = "" :: string(), %% user name of owner
gname = "" :: string(), %% group name of owner
devmajor = 0 :: non_neg_integer(), %% major number of character or block device
devminor = 0 :: non_neg_integer(), %% minor number of character or block device
- atime :: calendar:datetime(), %% access time
- ctime :: calendar:datetime() %% status change time
+ atime :: tar_time(), %% access time
+ ctime :: tar_time() %% status change time
}).
-type tar_header() :: #tar_header{}.