Solved

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

Posted on 2012-04-05
3
79 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

747 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

13 Experts available now in Live!

Get 1:1 Help Now