]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/datetime.cpp
Make to_unixtime const
[libs/core.git] / source / time / datetime.cpp
index 283a7c6c7578c73484224e27615f92fe78d7ee79..86238863282340996339071236f51b4a212e193f 100644 (file)
@@ -1,4 +1,10 @@
-/* $Id$ */
+/* $Id$
+
+This file is part of libmspcore     
+Copyright © 2006  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #include <cstdlib>
 #include <sstream>
 #include <iomanip>
@@ -197,7 +203,7 @@ int DateTime::cmp(const DateTime &dt) const
 TimeStamp DateTime::get_timestamp() const
 {
        if(year<-289701 || year>293641)
-               throw Exception("DateTime is not representable as a TimeStamp");
+               throw InvalidState("DateTime is not representable as a TimeStamp");
 
        RawTime raw=(((hour*60LL)+minute)*60+second)*1000000+usec;
        int days=(year-1970)*365;