Unix Timestamp to float - too small

Im trying to send the time to the Arduino using the Unix timestamp. Im sending the timestamp via bluetooth from my Phone.
The Phone is sending f.ex-"1418755032230", and the Arduino gets 1415824512", which was one month ago. what else could i use instead of float? int is going to overflow.

Code

#include <Time.h>
#include <SoftwareSerial.h>
#include <String.h>


SoftwareSerial mySerial( 6, 5); // RX, TX
float zeit;
void setup() {
   Serial.begin(9600);
   mySerial.begin(9600); 
}

void loop() {
  if(mySerial.available() >=13) {
    zeit = mySerial.parseFloat();
     Serial.println("FLOAT");
    Serial.println("BT ANGEKOMMEN");
    Serial.println(zeit);
    setTime(zeit);
    Serial.println("ZEIT:");
    Serial.println(now());
     Serial.println("SEKUNDEN");
    Serial.println(second());
     Serial.println("MINUTEN");
    Serial.println(minute());
     Serial.println("STUNDEN");
    Serial.println(hour());
     Serial.println("TAG");
    Serial.println(day());
     Serial.println("MONAT");
    Serial.println(month());
     Serial.println("JAHR");
    Serial.println(year());
  }
}

Unix time is customarily represented by a signed long integer, and cannot be represented by a single precision floating point number as implemented in the Arduino IDE.

Don't include the milliseconds in what you send (send 1418755032230 / 1000 = 1418755032).

Use time_t instead of float.

Thanks :slight_smile: Got it working now ^^

~Straw