Solved

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

Posted on 2012-04-05
3
113 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Brent Challis
Brent Challis 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
This collection of functions covers all the normal rounding methods of just about any numeric value.
Viewers will learn the different options available in the Backstage view in Excel 2013.
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 …

696 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