octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestam


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #64933] Stat sometimes produces wrong timestamp
Date: Mon, 27 Nov 2023 17:22:25 -0500 (EST)

Follow-up Comment #9, bug #64933 (project octave):

don't know if this was useful, but assuming it will work for any file created
during the previous dst period:

I set the time locally to march 12 2023 01:59 and verified it jumps forward to
03:00.  

before the time change, created a file testfile.txt:


>> time
ans = 1678604367.157886

>> stat('testfile.txt')
ans =

  scalar structure containing the fields:

    dev = 2
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 2
    size = 0
    atime = 1678604356
    mtime = 1678604356
    ctime = 1678604397
    blksize = NaN
    blocks = NaN

>> stat(fopen('testfile.txt'))
ans =

  scalar structure containing the fields:

    dev = 0
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 0
    size = 0
    atime = 1678604356
    mtime = 1678604356
    ctime = 1678604397
    blksize = NaN
    blocks = NaN

>> fclose all



after the time change:


>> time
ans = 1678604408.970258
>> stat('testfile.txt')
ans =

  scalar structure containing the fields:

    dev = 2
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 2
    size = 0
    atime = 1678604356
    mtime = 1678604356
    ctime = 1678604397
    blksize = NaN
    blocks = NaN

>> stat(fopen('testfile.txt'))
ans =

  scalar structure containing the fields:

    dev = 0
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 0
    size = 0
    atime = 1678604356
    mtime = 1678604356
    ctime = 1678604397
    blksize = NaN
    blocks = NaN



doing the same for Nov 5

before time change, created a new file testfile2.txt:


>> time
ans = 1699164008.989853
>> stat('testfile2.txt')
ans =

  scalar structure containing the fields:

    dev = 2
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 2
    size = 0
    atime = 1699164003
    mtime = 1699164003
    ctime = 1699164003
    blksize = NaN
    blocks = NaN

>> stat(fopen('testfile2.txt'))
ans =

  scalar structure containing the fields:

    dev = 0
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 0
    size = 0
    atime = 1699164003
    mtime = 1699164003
    ctime = 1699164003
    blksize = NaN
    blocks = NaN


after time change


>> time
ans = 1699164025.525178

>> stat('testfile2.txt')
ans =

  scalar structure containing the fields:

    dev = 2
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 2
    size = 0
    atime = 1699164003
    mtime = 1699164003
    ctime = 1699164003
    blksize = NaN
    blocks = NaN

>> stat(fopen('testfile2.txt'))
ans =

  scalar structure containing the fields:

    dev = 0
    ino = 0
    mode = 33206
    modestr = -rw-rw-rw-
    nlink = 1
    uid = 0
    gid = 0
    rdev = 0
    size = 0
    atime = 1699164003
    mtime = 1699164003
    ctime = 1699164003
    blksize = NaN
    blocks = NaN


>> fclose all


so, no difference seen here.

Octave 8.4.0, windows 10. 



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64933>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]