Solved

Convert windows date modified timestamp on a file to UTC time ?

Posted on 2012-04-05
3
90 Views
Last Modified: 2015-06-03
Hello all.

I have a client who is requesting that a file that we serve to them (via FTP) to have the date modified time in UTC and not EDT.  I have searched and can't find an easy way to do this via command line or powershell.

Another potential item might be to append the UTC time to the actual filename itself.

Does anyone have any experience in doing either of these?

Thanks!
0
Comment
Question by:awsnoc
3 Comments
 
LVL 6

Accepted Solution

by:
wshark83 earned 167 total points
ID: 37812318
can you please clarify by what you mean "to have the date modified time in UTC and not EDT"

does the user want to see the modification time in utc in the explorer bar/FTP?

if that's the case then you would need to either set the system time of FTP in utc or as you mentioned add the utc time in the file name.............
0
 
LVL 6

Assisted Solution

by:Raquero
Raquero earned 167 total points
ID: 37812374
Point of order: NTFS uses UTC for timestamps. The displayed timestamps are translated to the client OS time zone settings.

Here is a detailed article that covers all things timestamp and has some examples of utilities to modify timestamps:

http://www.techrepublic.com/article/build-your-skills-learn-to-manipulate-file-time-stamps-in-windows/5034280
0
 
LVL 8

Assisted Solution

by:bchallis
bchallis earned 166 total points
ID: 37854375
There is a property of the files called LastWriteTimeUtc.  you could extract that from the file.  The following PowerShell line gets a directory listing to show you the difference between the two LastWriteTime properties.

dir c:\data\development\powershell | select Name,LastWriteTime,LastWriteTimeUtc | Out-GridView
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now