# date error in Q-files

**URL:** https://discourse.obspy.org/t/date-error-in-q-files/404
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [April 7, 2015, 8:49am UTC](https://discourse.obspy.org/t/date-error-in-q-files/404 "2015-04-07T08:49:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Dirk\_Rossler](https://discourse.obspy.org/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@Dirk\_Rossler](https://discourse.obspy.org/u/Dirk_Rossler)
#### Post date: [April 7, 2015, 8:49am UTC](https://discourse.obspy.org/t/date-error-in-q-files/404/1 "2015-04-07T08:49:42Z")

</div>

It seems that the starttimes of traces are not handled correctly when writing to Q-files using the st.write(file, format='Q') and when the starttime of the trace is before 1970.

In this case 100 years are added to the starttime in the output file, e.g. 1969,12,31 --\> 2069,12,31.

I am using obspy 0.10.

Dirk

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [April 7, 2015, 9:29am UTC](https://discourse.obspy.org/t/date-error-in-q-files/404/2 "2015-04-07T09:29:08Z")

</div>

Hi Dirk,

this is a problem of reading, not writing. See  
[https://github.com/obspy/obspy/blob/master/obspy/io/sh/core.py#L628-L632](https://github.com/obspy/obspy/blob/master/obspy/io/sh/core.py#L628-L632).  
I assume you have a file with "year" stored with two digits only.  
Nothing we can do in that case.

best,  
Tobias
