Code Sample, a copy-pastable example if possible

import pandas as pd
L1 = [1,2,3,4,5,6,7,8,9,10]
df = pd.DataFrame({"L1":L1})
df.to_excel("test.xlsx")

Problem description

Files in Windows Explorer have three dates assigned: - Date Created - Date Accessed - Date Modified

I'm using a german Windows 10, but I'm pretty sure it's Date Accessed I'm talking about now:

Exporting a dataframe in Windows 10 using to_excel() assigns a Date Accessed in Windows Explorer that corresponds to the moment that to_excel() was first executed in the respective iPython console plus 2 hours.

So when I execute to_excel() first at 10:24 the file and each subsequent file gets an initial Date Accessed value of 12:24. Resetting the console does not change that, only opening a complete new console does.

EDIT: There is no change in behaviour when a file is created at a time past the future Date Accessed.

The fields Date Created and Date Modified get the correct timestamp.

My timezone is UTC+2 (CET+1 DST), maybe that has something to do with it.

Editor: Spyder 3.2.0

Expected Output

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.2.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 79 Stepping 1, GenuineIntel byteorder: little LC_ALL: None LANG: en LOCALE: None.None pandas: 0.20.3 pytest: 3.1.1 pip: 9.0.1 setuptools: 33.1.1.post20170320 Cython: 0.26 numpy: 1.13.1 scipy: 0.19.1 xarray: None IPython: 6.1.0 sphinx: 1.6.2 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: None numexpr: None feather: None matplotlib: 2.0.2 openpyxl: 2.4.8 xlrd: 1.0.0 xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.999 sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.6 s3fs: None pandas_gbq: None pandas_datareader: None

Comment From: gfyoung

Thanks reporting this issue! While this does sound a little strange, we don't do anything fancy with timestamp-ing Excel files on our end for this to happen (I've never seen it myself as a Windows user). Thus, I think it's just Windows misbehaving there.

I will close this for now, but if I'm incorrect on this, we'll be happy to re-open.

Comment From: Khris777

Okay, no problem. Those three different dates in Windows seem to be a fickle issue in general.