Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. DOS timestamp vs Explorer timestamp

DOS timestamp vs Explorer timestamp

Scheduled Pinned Locked Moved The Lounge
visual-studioregexquestion
23 Posts 10 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OriginalGriffO OriginalGriff

    I've just checked here, and DIR in a CMD box is giving me identical timestamps to the default view in Explorer: that's on Win10 AE What are you doing that shows the problem? What system?

    Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

    R Offline
    R Offline
    Richard Jones
    wrote on last edited by
    #3

    I'm on Win10, but they are all on Win7. As example my C:\ shows Windows folder 02/11/2016 10:40am My DOS CMD window shows Windows folder 02/11/2016 09:40am Edit: also Temp folder is 15/11/2016 11:53am in both. So it appears to only be off for files before time change.

    I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

    OriginalGriffO J 2 Replies Last reply
    0
    • R Richard Jones

      I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

      I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #4

      Raymond Chen posted the explanation back in 2013: Why do Explorer and the command prompt interpret file times differently? – The Old New Thing[^] NB: Powershell shows the same timestamp as Explorer. It's only the ancient cmd.exe that gets it wrong.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      • R Richard Jones

        I'm on Win10, but they are all on Win7. As example my C:\ shows Windows folder 02/11/2016 10:40am My DOS CMD window shows Windows folder 02/11/2016 09:40am Edit: also Temp folder is 15/11/2016 11:53am in both. So it appears to only be off for files before time change.

        I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #5

        Strange: mine shows the same timestamps: DirVsExplorer.jpg (794.5 KB)

        Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        R 1 Reply Last reply
        0
        • R Richard Jones

          I'm on Win10, but they are all on Win7. As example my C:\ shows Windows folder 02/11/2016 10:40am My DOS CMD window shows Windows folder 02/11/2016 09:40am Edit: also Temp folder is 15/11/2016 11:53am in both. So it appears to only be off for files before time change.

          I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #6

          How old are these files? Something else is a bit off I think. We just went off of daylight savings, so we gained an hour that we lost. So, if it was a result of the recent switch off of DST I'd think the command window would be showing a time of 11:40 AM, with explorer being one hour sooner. Which it's not, so it's gotta be something else. Can you give us examples of real dates?

          Jeremy Falcon

          R 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            Strange: mine shows the same timestamps: DirVsExplorer.jpg (794.5 KB)

            Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

            R Offline
            R Offline
            Richard Jones
            wrote on last edited by
            #7

            Look at your Windows10 upgrade folder.

            I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

            1 Reply Last reply
            0
            • J Jeremy Falcon

              How old are these files? Something else is a bit off I think. We just went off of daylight savings, so we gained an hour that we lost. So, if it was a result of the recent switch off of DST I'd think the command window would be showing a time of 11:40 AM, with explorer being one hour sooner. Which it's not, so it's gotta be something else. Can you give us examples of real dates?

              Jeremy Falcon

              R Offline
              R Offline
              Richard Jones
              wrote on last edited by
              #8

              I can't seem to upload a file. But I gave 2 examples earlier.

              I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

              J 1 Reply Last reply
              0
              • R Richard Jones

                I can't seem to upload a file. But I gave 2 examples earlier.

                I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #9

                Is that in MM/DD/YYYY or DD/MM/YYYY?

                Jeremy Falcon

                R 1 Reply Last reply
                0
                • J Jeremy Falcon

                  Is that in MM/DD/YYYY or DD/MM/YYYY?

                  Jeremy Falcon

                  R Offline
                  R Offline
                  Richard Jones
                  wrote on last edited by
                  #10

                  The dates are in DD/MM/YYYY

                  I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                  J 1 Reply Last reply
                  0
                  • R Richard Jones

                    I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

                    I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                    J Offline
                    J Offline
                    Jeremy Falcon
                    wrote on last edited by
                    #11

                    This is a complete hack, and I can't say I'm crazy about the idea, but at least it's something... Batch files and Daylight Savings[^]

                    Jeremy Falcon

                    R 1 Reply Last reply
                    0
                    • J Jeremy Falcon

                      This is a complete hack, and I can't say I'm crazy about the idea, but at least it's something... Batch files and Daylight Savings[^]

                      Jeremy Falcon

                      R Offline
                      R Offline
                      Richard Jones
                      wrote on last edited by
                      #12

                      Wow. That's a lot of work. Appreciated. I'd have to apply that to each file in the folder. I might just get them to turn DST on manually when they run a script for now.

                      I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                      J 1 Reply Last reply
                      0
                      • R Richard Jones

                        Wow. That's a lot of work. Appreciated. I'd have to apply that to each file in the folder. I might just get them to turn DST on manually when they run a script for now.

                        I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                        J Offline
                        J Offline
                        Jeremy Falcon
                        wrote on last edited by
                        #13

                        Good luck man, would be interested to hear the solution you come up with.

                        Jeremy Falcon

                        1 Reply Last reply
                        0
                        • R Richard Jones

                          The dates are in DD/MM/YYYY

                          I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                          J Offline
                          J Offline
                          Jeremy Falcon
                          wrote on last edited by
                          #14

                          I think this is what's happening then. I'm *guessing* the timestamp was saved in its real time (without a DST modifier) when DST was on. Presumably, the command window was smart enough to know DST is on and therefore adjusted the timestamps when shown on the fly. However, now that DST is off, it doesn't. Which is all fine and dandy except 9:40 didn't really exist back when that file was modified. Any new changes, using the same logic, would be ok simply because DST off is off. So all good and the command processor doesn't need to be as smart as explorer. To get around this, you're pretty much screwed bro. Best I think you can do in a batch file / script is just figure out if your date is within certain dates from when DST switches on and off and then account for it. It's hard coded. It's nasty. Not sure of anything else though. And of course write a strongly written letter to MS for not storing timestamps in UTC. :)

                          Jeremy Falcon

                          Richard DeemingR 1 Reply Last reply
                          0
                          • J Jeremy Falcon

                            I think this is what's happening then. I'm *guessing* the timestamp was saved in its real time (without a DST modifier) when DST was on. Presumably, the command window was smart enough to know DST is on and therefore adjusted the timestamps when shown on the fly. However, now that DST is off, it doesn't. Which is all fine and dandy except 9:40 didn't really exist back when that file was modified. Any new changes, using the same logic, would be ok simply because DST off is off. So all good and the command processor doesn't need to be as smart as explorer. To get around this, you're pretty much screwed bro. Best I think you can do in a batch file / script is just figure out if your date is within certain dates from when DST switches on and off and then account for it. It's hard coded. It's nasty. Not sure of anything else though. And of course write a strongly written letter to MS for not storing timestamps in UTC. :)

                            Jeremy Falcon

                            Richard DeemingR Offline
                            Richard DeemingR Offline
                            Richard Deeming
                            wrote on last edited by
                            #15

                            Why do Explorer and the command prompt interpret file times differently? – The Old New Thing[^] Explorer is showing the timestamp using the DST settings which were in effect when the timestamp was created. Powershell does the same. The venerable command prompt is showing the timestamp using the DST settings which are in effect now. And as Raymond said, fixing that minor display bug would carry too much risk of breaking something else.


                            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                            "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                            J 1 Reply Last reply
                            0
                            • Richard DeemingR Richard Deeming

                              Why do Explorer and the command prompt interpret file times differently? – The Old New Thing[^] Explorer is showing the timestamp using the DST settings which were in effect when the timestamp was created. Powershell does the same. The venerable command prompt is showing the timestamp using the DST settings which are in effect now. And as Raymond said, fixing that minor display bug would carry too much risk of breaking something else.


                              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                              J Offline
                              J Offline
                              Jeremy Falcon
                              wrote on last edited by
                              #16

                              Gotcha. I'd be ok with that risk though. :laugh:

                              Jeremy Falcon

                              1 Reply Last reply
                              0
                              • R Richard Jones

                                I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

                                I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                                K Offline
                                K Offline
                                Kirill Illenseer
                                wrote on last edited by
                                #17

                                Firs of all: Are we really talking DOS here, or the NT command prompt? Those two are technologically distinct.

                                R 1 Reply Last reply
                                0
                                • R Richard Jones

                                  I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

                                  I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                                  1 Offline
                                  1 Offline
                                  1650
                                  wrote on last edited by
                                  #18

                                  Have you tried possibly correcting the time in the bios? Think I once had an ancient dell with similar issues

                                  1 Reply Last reply
                                  0
                                  • R Richard Jones

                                    I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

                                    I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                                    M Offline
                                    M Offline
                                    MikeD 2
                                    wrote on last edited by
                                    #19

                                    I see a similar problem One of my vb programs checks to make sure all its files are up to date and then copies in updates using xcopy if necessary I haven't noticed a pattern yet in the PCs it happens to but sometimes the program tries to update at every start. When I check I find the file is identical but the timestamp is one hour out so I manually copy using explorer and everything is happy again

                                    1 Reply Last reply
                                    0
                                    • K Kirill Illenseer

                                      Firs of all: Are we really talking DOS here, or the NT command prompt? Those two are technologically distinct.

                                      R Offline
                                      R Offline
                                      Richard Jones
                                      wrote on last edited by
                                      #20

                                      It's the CMD window. Clock is correct, new files are ok, just ones from before time change are different in CMD dir.

                                      I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                                      1 Reply Last reply
                                      0
                                      • R Richard Jones

                                        I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

                                        I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                                        K Offline
                                        K Offline
                                        KLSmith
                                        wrote on last edited by
                                        #21

                                        This has been a problem for over a decade. I particularly see it with networked drives. If I have the same file on a local drive and on a networked drive, the file timestamps are off by one hour for 6 months of the year. File timestamps should only be valid in GMT. Let the final software call an OS function to convert it to local time just before displaying the file time. It's when the OS tries to be too smart that the problem arises. Some BIOS can automatically adjust for DST. But so can the OS. I believe the problem is when one drive is already automatically adjusted, but another drive is not. As in local drive versus networked drive.

                                        1 Reply Last reply
                                        0
                                        • R Richard Jones

                                          I never noticed this before. Some of my users have shown me folders in Explorer have one time. The same folder in DOS CMD window are off by 1 hour. DST happened recently so could be involved. I've googled and found mention that the timestamps are supposed to reflect that. But it should be consistent. New files have identical timestamps, so it's just existing files. Also, any workaround to get the DOS window to match timestamps? Scripts are feeding bad data.

                                          I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day. John Simmons / outlaw programmer

                                          G Offline
                                          G Offline
                                          GenJerDan
                                          wrote on last edited by
                                          #22

                                          I hate the timestamps. It drives me batty to see a Modified Date earlier than the Created Date. Yes, I know how that happens, but it still drives me crazy.

                                          We won't sit down. We won't shut up. We won't go quietly away. YouTube and My Mu[sic], Films and Windows Programs, etc.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups