time stamps

Discussion in 'Linux VPS/Dedicated - cPanel' started by Mary Nevius, Nov 17, 2018.

  1. Mary Nevius

    Mary Nevius New Member

    My client asked these questions and I am unsure of the answers.
    Knowing when a file was created/changed
    The idea is to be able to see: when a file was created, whether the instance in a different folder is newer, older or just a copy.
    Example:
    I just copied files from my local drive into a subfolder of “docs”
    1. Timestamp for the files varied
    2. the uploaded files all have the exact same timestamp i.e. when the files were placed in the folder regardless of when the file was created
    3. when uploaded,
      1. AZ time was 16 Nov 23:12
      2. EST was 17 Nov 01:12
      3. Timestamp in ProFiles (a Joomla file management tool) is 17 Nov 06:12
      4. SO – timestamp must be coming from Europe or UTC
    I copied a file from that folder into a parent folder – the timestamp reflected when the copy occurred. Again, that fails to meet the need, which should be date/time of the original

    The same thing occurred when Joomla was restored from a backup. The date reflected restoration, not file when the file was actually created.
    The client also says "The observed behavior is not what I grew up with in a pure unix environment where creation/modification date was preserved during copy/move/unpack."

    The WHM time indicates the server time is Eastern US time and the Joomla installation is set to Eastern US time.
    I am finding conflicting information regarding how the server linux/unix handles time stamps so I am posting here so other users can benefit from this knowledge as well.
     
  2. phpAddict

    phpAddict Active Member

    Does this by chance answer your question?
    https://forums.cpanel.net/threads/c...-modification-date-when-copying-files.349812/
    If you copy a file within SSH it should keep the original timestamp, but when copying from filemanager or from a web application since it copies the file differently, than actually copying a file within the console, it essentially is creating a new file from the original, hence the timestamp update. To get around this you could use FTP commands within your web script to maintain those timestamps.
    Anyone please correct me if I'm wrong.
     
    KH-Jonathan likes this.

Share This Page