<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="weeks = pd.Series(pd.date_range('2018-01', '2018-02', freq='7D', tz='America/New_York'))
week_ago = weeks.groupby([1, 1, 1, 1, 1]).shift()
print(week_ago)"><pre class="notranslate"><span class="pl-s1">weeks</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2018-01'</span>, <span class="pl-s">'2018-02'</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'7D'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'America/New_York'</span>))
<span class="pl-s1">week_ago</span> <span class="pl-c1">=</span> <span class="pl-s1">weeks</span>.<span class="pl-en">groupby</span>([<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>]).<span class="pl-en">shift</span>()
<span class="pl-en">print</span>(<span class="pl-s1">week_ago</span>)</pre></div>
<p dir="auto">Outputs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0                   NaT
1   2018-01-01 05:00:00
2   2018-01-08 05:00:00
3   2018-01-15 05:00:00
4   2018-01-22 05:00:00
dtype: datetime64[ns]"><pre class="notranslate"><code class="notranslate">0                   NaT
1   2018-01-01 05:00:00
2   2018-01-08 05:00:00
3   2018-01-15 05:00:00
4   2018-01-22 05:00:00
dtype: datetime64[ns]
</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Shifting a groupby'd datetime column removes the timezone. It's not mentioned in the documentation so either the timezone should be preserved or the documentation should mention that timezone is removed (by converting to UTC it seems).</p>
<p dir="auto">I had a quick look and couldn't find another issue for this. I glanced at the GroupBy shift implementation and my guess is that it's due to cython/numpy not supporting timezones.</p>
<p dir="auto">I'm happy to work on a fix if someone says what the preferred solution is.</p>
<h4 dir="auto">Expected Output</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0                         NaT
1   2018-01-01 00:00:00-05:00
2   2018-01-08 00:00:00-05:00
3   2018-01-15 00:00:00-05:00
4   2018-01-22 00:00:00-05:00
dtype: datetime64[ns, America/New_York]"><pre class="notranslate"><code class="notranslate">0                         NaT
1   2018-01-01 00:00:00-05:00
2   2018-01-08 00:00:00-05:00
3   2018-01-15 00:00:00-05:00
4   2018-01-22 00:00:00-05:00
dtype: datetime64[ns, America/New_York]
</code></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.3.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 3.10.0-693.el7.x86_64<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: en_US.UTF-8<br>
LANG: en_US.UTF-8<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.21.0<br>
pytest: 3.4.1<br>
pip: 9.0.1<br>
setuptools: 38.5.1<br>
Cython: None<br>
numpy: 1.13.3<br>
scipy: 1.0.0<br>
pyarrow: 0.8.0<br>
xarray: None<br>
IPython: 6.2.1<br>
sphinx: None<br>
patsy: 0.5.0<br>
dateutil: 2.6.1<br>
pytz: 2018.3<br>
blosc: None<br>
bottleneck: 1.2.1<br>
tables: None<br>
numexpr: 2.6.4<br>
feather: 0.4.0<br>
matplotlib: 2.1.2<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 0.9999999<br>
sqlalchemy: 1.2.1<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.10<br>
s3fs: None<br>
fastparquet: 0.1.4<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>
<p dir="auto">need a systematic test of all groupby methods here.</p>
<p dir="auto">This works as expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')],
              'A': [3]}).groupby('A', as_index=False).head(1)"><pre class="notranslate"><code class="notranslate">pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')],
              'A': [3]}).groupby('A', as_index=False).head(1)
</code></pre></div>
<p dir="auto">However, this loses the timezone:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')],
              'A': [3]}).groupby('A', as_index=False).first()"><pre class="notranslate"><code class="notranslate">pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')],
              'A': [3]}).groupby('A', as_index=False).first()
</code></pre></div>