0

I am using the gzipstream to compress my file in c#. While the gz file has the proper timestamp, the actual file shows the UTC time stamp when decompressed. Is there a way to get the current system timezone and set it on the file to be compressed ?

I am using the same code in the example at http://msdn.microsoft.com/en-us/library/system.io.compression.compressionmode.aspx

wishy
  • 1,748
  • 2
  • 12
  • 14
  • Unlike a .zip file, a .gz is not an archive that stores compressed files. It just stores compressed bytes. If you want to store compressed files and their meta-data, the usual solution is to put the files in a .tar file and then compress the .tar file to a .gz file. – dtb Jul 16 '13 at 19:22

1 Answers1

0

Realized that the time stamp was wrong only when I unzipped using Winrar software. When I unzipped using 7zip, the file had the proper time stamp.

wishy
  • 1,748
  • 2
  • 12
  • 14