behnam_tr Active Member Licensed User Longtime User Aug 12, 2019 #1 hi @DonManfred in jtelegrambot lib the "message.date" and "replymessage.date" have a problem message.date return int value but the int has limit it should long or string for example : Log("Date:" & message.Date) //int Log("system:"&DateTime.Now) //long result : Date:1565595517 (this is mistake) system:1565595522768 (this is correct)
hi @DonManfred in jtelegrambot lib the "message.date" and "replymessage.date" have a problem message.date return int value but the int has limit it should long or string for example : Log("Date:" & message.Date) //int Log("system:"&DateTime.Now) //long result : Date:1565595517 (this is mistake) system:1565595522768 (this is correct)
DonManfred Expert Licensed User Longtime User Aug 12, 2019 #2 behnam_tr said: Date:1565595517 (this is mistake) system:1565595522768 (this is correct) Click to expand... 1565595517 <- Seconds 1565595522768 <- Ticks Upvote 0
behnam_tr said: Date:1565595517 (this is mistake) system:1565595522768 (this is correct) Click to expand... 1565595517 <- Seconds 1565595522768 <- Ticks
behnam_tr Active Member Licensed User Longtime User Aug 12, 2019 #3 DonManfred said: 1565595517 <- Seconds 1565595522768 <- Ticks Click to expand... you mean that i should convert seconds to ticks ?? how ?? plz give me a sample Upvote 0
DonManfred said: 1565595517 <- Seconds 1565595522768 <- Ticks Click to expand... you mean that i should convert seconds to ticks ?? how ?? plz give me a sample
E emexes Expert Licensed User Aug 12, 2019 #5 DonManfred said: 1565595517 <- Seconds 1565595522768 <- Ticks Click to expand... behnam_tr said: you mean that i should convert seconds to ticks ?? how ?? plz give me a sample Click to expand... I think what DonManfred meant to write - and given his usual aversion to ambiguity, I was surprised that he didn't - was: 1565595517 <- Seconds 1565595522768 <- Milliseconds Date and time values are stored as ticks. Ticks are the number of milliseconds since January 1, 1970 00:00:00 UTC Within the B4X universe (possibly excluding B4R) ticks == milliseconds. Upvote 0
DonManfred said: 1565595517 <- Seconds 1565595522768 <- Ticks Click to expand... behnam_tr said: you mean that i should convert seconds to ticks ?? how ?? plz give me a sample Click to expand... I think what DonManfred meant to write - and given his usual aversion to ambiguity, I was surprised that he didn't - was: 1565595517 <- Seconds 1565595522768 <- Milliseconds Date and time values are stored as ticks. Ticks are the number of milliseconds since January 1, 1970 00:00:00 UTC Within the B4X universe (possibly excluding B4R) ticks == milliseconds.
E emexes Expert Licensed User Aug 12, 2019 #6 behnam_tr said: in jtelegrambot lib the "message.date" and "replymessage.date" have a problem message.date return int value but the int has limit Click to expand... You're right about the limit, though. Gird thy loins for 2038. Upvote 0
behnam_tr said: in jtelegrambot lib the "message.date" and "replymessage.date" have a problem message.date return int value but the int has limit Click to expand... You're right about the limit, though. Gird thy loins for 2038.
DonManfred Expert Licensed User Longtime User Aug 12, 2019 #7 https://core.telegram.org/bots/api#message Based on Telegramdocs Date from a Message (for ex.) is defined as Integer. Date the message was sent in Unix time Click to expand... Upvote 0
https://core.telegram.org/bots/api#message Based on Telegramdocs Date from a Message (for ex.) is defined as Integer. Date the message was sent in Unix time Click to expand...
behnam_tr Active Member Licensed User Longtime User Aug 12, 2019 #8 DonManfred said: Multiply it by 1000 Click to expand... thanks problem solved with this Upvote 0