if $TZ is unset and /etc/localtime is UTC then why are you using timezone T (Tango) in the date command?
On my system I have a localtime of EDT.
# date
Wed Mar 18 12:39:03 EDT 2015
# date -d "1970-01-01 00:00:00" "+%s"
18000
If I force it to Tango then I get a negative number:
# date -d "1970-01-01T00:00:00" "+%s"
-25200
If I change my timezone to UTC it will work as expected:
# export TZ=UTC
# date
Wed Mar 18 16:41:23 UTC 2015
# date -d "1970-01-01 00:00:00" "+%s"
0
from the date man page:
DATE STRING
The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42
-0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar
date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indi-
cates the beginning of the day. The date string format is more complex than is easily documented here but is
fully described in the info documentation.
As you can see it is a "mostly free format human readable date", it will pick up the timezone from anywhere it sees fit. It is very easy to test it.
For example:
# date
Wed Mar 18 13:05:42 EDT 2015
now with Tango time:
[root@wailea ~]# date -d "2015-3-18T13:05:42"
Wed Mar 18 02:05:42 EDT 2015
now with Tango time at the end:
[root@wailea ~]# date -d "2015-3-18 13:05:42 T"
Wed Mar 18 02:05:42 EDT 2015
now Zulu time:
[root@wailea ~]# date -d "2015-3-18Z13:05:42"
Wed Mar 18 09:05:42 EDT 2015
I think you can see the point. If you are not familiar with military timezones here is the list: http://www.timeanddate.com/time/zones/military
You can also try to use zdump to see if your zone file is not really what you are expecting:
Zdump prints the current time in each zonename named on the command line.
# zdump /etc/localtime
/etc/localtime Wed Mar 18 21:21:04 2015 EDT