Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The timestamp of the files in the artifact (trx) is not the one of the original file (zip) #639

Open
SharkyEXE opened this issue Nov 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SharkyEXE
Copy link

SharkyEXE commented Nov 4, 2024

What happened?

The timestamp of the files in the artifact (trx) is not the one of the original file (zip)

What did you expect to happen?

That the timestamps of the files (trx) in the archive (zip) of the artifact are the same as the original file (zip)

How can we reproduce it?

Give a specific timestamp to a file
use actions/upload-artifact@v4 for that file

Then after job is run, download the artifact locally. You can see that the timestamps is not the same as before

  1. Go to https://github.com/shvchk/padavan-builder-workflow
  2. Fork this repository, further steps should be performed in your fork
  3. In your fork, in your file build.config copy-paste code from file (https://gitlab.com/hadzhioglu/padavan-ng/-/blob/master/trunk/configs/templates/asus/rt-n56ub1.config)
  4. In your fork, create a pre-build.sh with code

ln -snf /usr/share/zoneinfo/Africa/Nairobi /etc/localtime
apt update
DEBIAN_FRONTEND=noninteractive apt install tzdata -y
date

  1. In your fork, run the build process: Actions → Build firmware → Run workflow
    run-workflow
  2. If the process finishes successfully, its status indicator would turn green with a check mark
  3. Click on the finished process. Archive with the firmware would be stored as its artifact
    For example
    2024-11-04_0002
  4. Download zip file (for example padavan-ng_ASUS_RT-N56UB1_2024.11.04_00.20.50.zip) and open zip file on Windows 11 in program 7-Zip
  5. Your see, time trx file - do not time make zip file
    For example
    time make zip file is 00.20.50
    time trx file is 21:20
    2024-11-04_0001

Anything else we need to know?

Hello

After build firmware - make trx file, trx file packed in zip archive and zip arhive upload with Upload artifacts

2024-11-04_0002

But time file trx - Universal time (UTC)

Current default time zone: 'Africa/Nairobi'
Local time is now: Sun Nov 3 23:43:19 EAT 2024.
Universal Time is now: Sun Nov 3 20:43:19 UTC 2024.

File: padavan-ng/trunk/images/RT-N56UB1_3.4.3.9L-102-543451d5a6.trx
Size: 14532570 Blocks: 28384 IO Block: 4096 regular file
Device: 801h/2049d Inode: 698913 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-11-04 00:20:50.351683705 +0300
Modify: 2024-11-04 00:20:50.211682600 +0300
Change: 2024-11-04 00:20:50.211682600 +0300
Birth: 2024-11-04 00:20:50.143682064 +0300

Screenshot - i download zip file and open zip file on Windows 11 in program 7-Zip version 23.01 (x64)

2024-11-04_0001

Code for make trx file, trx file packed in zip archive and zip arhive upload with ### Upload artifacts

  • name: Upload artifacts
    uses: actions/upload-artifact@v4
    with:
    name: padavan-ng_${{ env.CONFIG_VENDOR }}${{ env.CONFIG_FIRMWARE_PRODUCT_ID }}${{ env.BUILD_TIMESTAMP }}
    retention-days: 7
    path: |
    ${{ env.FW_FILE_NAME }}
    build.config

Possible or not add parameter, such as UTC+03:00 or time zone: 'Africa/Nairobi' - see under, when use with parameter UTC+03:00 or time zone: 'Africa/Nairobi' - time trx files in zip archive will be Local time (UTC+03:00, UTC+04:00, offset relative to UTC), NOT Universal Time

  • name: Upload artifacts
    uses: actions/upload-artifact@v4
    with:
    name: padavan-ng_${{ env.CONFIG_VENDOR }}${{ env.CONFIG_FIRMWARE_PRODUCT_ID }}${{ env.BUILD_TIMESTAMP }}
    retention-days: 7
    path: |
    UTC+03:00 or time zone: 'Africa/Nairobi'
    ${{ env.FW_FILE_NAME }}
    build.config

Thank You!

What version of the action are you using?

actions/upload-artifact@v4

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No response

@SharkyEXE SharkyEXE added the bug Something isn't working label Nov 4, 2024
@SharkyEXE SharkyEXE changed the title How make "Time as Local time (UTC+03:00, UTC+04:00, offset relative to UTC)" for file with extension trx in zip archive? The timestamp of the files in the artifact (trx) is not the one of the original file (zip) Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant