Pravee7094 Active Member Dec 25, 2021 #1 Hello All, The below code is return the Current date in Debug Mode. But Does not return the current date in Release mode. B4X: Copy Dim is_DateAndTime As SntpTime Dim ll_date As Long = is_DateAndTime.getGmtNtpTime Log("Time Ticks : " & ll_date) DateTime.DateFormat = "dd-MM-yyyy" Dim ls_currentdate As String = DateTime.Date(ll_date) Log("Current Date : " & ls_currentdate) In "Logs" Tab: B4X: Copy Time Ticks : -1 Current Date : 01-01-1970 Any Suggestion? Thanks
Hello All, The below code is return the Current date in Debug Mode. But Does not return the current date in Release mode. B4X: Copy Dim is_DateAndTime As SntpTime Dim ll_date As Long = is_DateAndTime.getGmtNtpTime Log("Time Ticks : " & ll_date) DateTime.DateFormat = "dd-MM-yyyy" Dim ls_currentdate As String = DateTime.Date(ll_date) Log("Current Date : " & ls_currentdate) In "Logs" Tab: B4X: Copy Time Ticks : -1 Current Date : 01-01-1970 Any Suggestion? Thanks
Erel B4X founder Staff member Licensed User Longtime User Dec 26, 2021 #2 Are you using this class: https://www.b4x.com/android/forum/threads/b4x-sntp-class.86088/#content ? Upvote 0