{"task": {"agent_timeout": 3000, "task": "pandas-dev__pandas-53736", "verifier_timeout": 6000, "instruction": "BUG: resampling empty series loses time zone from dtype\n### Pandas version checks\n\n- [X] I have checked that this issue has not already been reported.\n\n- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.\n\n- [ ] I have confirmed this bug exists on the [main branch](https://pandas.pydata.org/docs/dev/getting_started/install.html#installing-the-development-version-of-pandas) of pandas.\n\n\n### Reproducible Example\n\n```python\ndf = pd.DataFrame({\n    'ts': [],\n    'values': []\n}).astype({'ts': 'datetime64[ns, Atlantic/Faroe]'})\ndf.resample('2MS', on='ts', closed='left', label='left', origin='start')['values'].sum().index\n```\n\n\n### Issue Description\n\nthis prints\n```python\nDatetimeIndex([], dtype='datetime64[ns]', name='ts', freq='2MS')\n```\n\n### Expected Behavior\n\n```\nDatetimeIndex([], dtype='datetime64[ns, Atlantic/Faroe]', name='ts', freq='2MS')\n```\n\nnote that this works fine if the series isn't empty\n```python\nIn [27]: df = pd.DataFrame({\n    ...:     'ts': [datetime(2020, 1, 1)],\n    ...:     'values': [10]\n    ...: })\n    ...: df['ts'] = df['ts'].dt.tz_localize('Atlantic/Faroe')\n    ...: df.resample('2MS', on='ts', closed='left', label='left', origin='start')['values'].sum().index\nOut[27]: DatetimeIndex(['2020-01-01 00:00:00+00:00'], dtype='datetime64[ns, Atlantic/Faroe]', name='ts', freq='2MS')\n```\n\n### Installed Versions\n\n<details>\n\nINSTALLED VERSIONS\n------------------\ncommit           : 965ceca9fd796940050d6fc817707bba1c4f9bff\npython           : 3.10.6.final.0\npython-bits      : 64\nOS               : Linux\nOS-release       : 5.10.102.1-microsoft-standard-WSL2\nVersion          : #1 SMP Wed Mar 2 00:30:59 UTC 2022\nmachine          : x86_64\nprocessor        : x86_64\nbyteorder        : little\nLC_ALL           : None\nLANG             : en_GB.UTF-8\nLOCALE           : en_GB.UTF-8\n\npandas           : 2.0.2\nnumpy            : 1.24.3\npytz             : 2023.3\ndateutil         : 2.8.2\nsetuptools       : 67.6.1\npip              : 23.0.1\nCython           : None\npytest           : 7.3.1\nhypothesis       : None\nsphinx           : None\nblosc            : None\nfeather          : None\nxlsxwriter       : None\nlxml.etree       : None\nhtml5lib         : None\npymysql          : None\npsycopg2         : None\njinja2           : 3.1.2\nIPython          : 8.13.2\npandas_datareader: None\nbs4              : 4.12.2\nbottleneck       : None\nbrotli           : None\nfastparquet      : None\nfsspec           : None\ngcsfs            : None\nmatplotlib       : 3.7.1\nnumba            : None\nnumexpr          : None\nodfpy            : None\nopenpyxl         : None\npandas_gbq       : None\npyarrow          : 12.0.0\npyreadstat       : None\npyxlsb           : None\ns3fs             : None\nscipy            : None\nsnappy           : None\nsqlalchemy       : None\ntables           : None\ntabulate         : None\nxarray           : None\nxlrd             : None\nzstandard        : None\ntzdata           : 2023.3\nqtpy             : None\npyqt5            : None\n\n</details>\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": 1, "instruction_truncated": false, "category": "debugging", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "swegym", "tags": ["debugging", "swe-bench"]}, "runs": []}