How is the time stamp number in /etc/shadow calculated?

ceving

On my system the man page of shadow defines the third column value this way:

The date of the last password change, expressed as the number of days since Jan 1, 1970.

I have an example value "17050". passwd -S says this is the "2016-09-06". But the seconds since 1970 are "1473112800.0". When I calculate 1473112800.0/(60*60*24) I get "17049.9166666666".

How is the "17050" calculated? Is it rounded or is it always the next greater integer?

Stephen Kitt

Checking the source code (for the Debian version), it’s just scaled using integer division by 24 × 3600, so it’s truncated.

Note that the value you have is exactly two hours off in your calculation, which can probably be explained by timezone variations.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How to log Serial data with time stamp?

分類Dev

How to stamp prompt at command execute time?

分類Dev

How to work with a Javascript +Date() numeric time stamp in Python?

分類Dev

Is time complexity of an algorithm calculated only based on number of times loop excecutes?

分類Dev

Can the time stamp of a Retweet be accessed?

分類Dev

Batch job definition: How to run a dynamically-calculated number of partitions?

分類Dev

Getting epoch time from gmt time stamp

分類Dev

How to find time stamp and decimal value reading from data stream in Java

分類Dev

how do i convert unix time stamp to formatted date while using json_extract_scalar in bigquery

分類Dev

how to tell rsync to preserve time stamp on files when source tree has a mounted point

分類Dev

How to add 3 months to a UTC time stamp in javascript centered at midnight 00 Hours?

分類Dev

remove specific characters from time stamp

分類Dev

pulling a time stamp from a txt file

分類Dev

Cassandra time stamp returns 0 rows

分類Dev

why Unix Time Stamp for same time is different in different timezone

分類Dev

How is the MTR scale calculated?

分類Dev

How to rename files to exclude the datetime stamp?

分類Dev

Unix Time stamp creation in C from custom data fields

分類Dev

Dynamically creating a excel sheet with current time stamp using SSIS Package

分類Dev

Preserving original time stamp of uploaded file in Azure Blob Storage

分類Dev

Get Time stamp using Java GMT+5:30

分類Dev

How is a CSS gradient path calculated?

分類Dev

How are these Java byte offsets calculated?

分類Dev

QSerialPort: how to adjust the emiting time of readysignal using number of bytes received

分類Dev

how to return a number with 2 decimal places all the time from a function

分類Dev

awk filter columns with calculated values and number range | updated

分類Dev

Sending a calculated number from textbox 1 to textbox 2

分類Dev

Wrong time calculated having more than 30min

分類Dev

SQL record with latest time stamp, but with a join enumerating the user, where NOT a particular status

Related 関連記事

  1. 1

    How to log Serial data with time stamp?

  2. 2

    How to stamp prompt at command execute time?

  3. 3

    How to work with a Javascript +Date() numeric time stamp in Python?

  4. 4

    Is time complexity of an algorithm calculated only based on number of times loop excecutes?

  5. 5

    Can the time stamp of a Retweet be accessed?

  6. 6

    Batch job definition: How to run a dynamically-calculated number of partitions?

  7. 7

    Getting epoch time from gmt time stamp

  8. 8

    How to find time stamp and decimal value reading from data stream in Java

  9. 9

    how do i convert unix time stamp to formatted date while using json_extract_scalar in bigquery

  10. 10

    how to tell rsync to preserve time stamp on files when source tree has a mounted point

  11. 11

    How to add 3 months to a UTC time stamp in javascript centered at midnight 00 Hours?

  12. 12

    remove specific characters from time stamp

  13. 13

    pulling a time stamp from a txt file

  14. 14

    Cassandra time stamp returns 0 rows

  15. 15

    why Unix Time Stamp for same time is different in different timezone

  16. 16

    How is the MTR scale calculated?

  17. 17

    How to rename files to exclude the datetime stamp?

  18. 18

    Unix Time stamp creation in C from custom data fields

  19. 19

    Dynamically creating a excel sheet with current time stamp using SSIS Package

  20. 20

    Preserving original time stamp of uploaded file in Azure Blob Storage

  21. 21

    Get Time stamp using Java GMT+5:30

  22. 22

    How is a CSS gradient path calculated?

  23. 23

    How are these Java byte offsets calculated?

  24. 24

    QSerialPort: how to adjust the emiting time of readysignal using number of bytes received

  25. 25

    how to return a number with 2 decimal places all the time from a function

  26. 26

    awk filter columns with calculated values and number range | updated

  27. 27

    Sending a calculated number from textbox 1 to textbox 2

  28. 28

    Wrong time calculated having more than 30min

  29. 29

    SQL record with latest time stamp, but with a join enumerating the user, where NOT a particular status

ホットタグ

アーカイブ