B4A Tutorial [B4X] DateUtils - Simplifies Date and Time Calculations - Erel    
Feb 7, 2021   
(10 reactions)   
tags: Date, dateutils, date time SetDateAndTime2(Years As Int, Months As Int, Days As Int, Hours As Int, Minutes As Int, Seconds As Int... example.
v1.05: Adds SetDateAndTime2. Allows you to explicitly set the time zone.
v1.03: Fixes a bug in NumberOfDaysInMonth method.
v1.02: Fixes a locale related bug (SetDate and SetDateAndTime).
v1...
Sub SetDateAndTime(Years As Int, Months As Int, Days As Int, Hours As Int, Minutes As Int, Seconds...
link: V1.05 released. New SetDateAndTime2 method. This method allows you to explicitly set the time zone...
B4A Question How to convert GMT time to my local Time? - Erel (first post)    
Sep 1, 2024   
(1 reaction)You should use DateUtils.SetDateAndTime2. This allows setting the time zone....
Italian Problemi con Timezone e ora legale - TILogistic (first post)    
Oct 27, 2020DateUtils
https://www.b4x.com/android/forum/threads/b4x-dateutils-simplifies-date-and-time-calcuations.26290/
SetDateAndTime2:
https://www.b4x.com/android/forum/pages/results/?query=SetDateAndTime2 ...
B4J Question Day light saving with long running B4J apps - Erel (first post)    
Oct 7, 2019Or does it???
Yes it does. Once you call SetTimeZone the time zone value will no longer change automatically.
Note that you can use DateUtils.SetDateAndTime2 instead of changing the time zone....
link: Erel,
Note that you can use DateUtils.SetDateAndTime2 instead of changing the time zone.
I cannot...
B4A Question changing date timezone with DateUtils - ALBRECHT    
Aug 5, 2019hello,
to check the DateUtils.SetDateAndTime2 timestamp,
I had trying that code :
'for the datetime = 08/05/2019 14:43:00
Dim mats As Long = DateUtils.SetDateAndTime2(2019, 8, 5, 14...
link: DateUtils.SetDateAndTime2 to convert correctly?...
link: .SetDateAndTime2
so, to record in my server (Paris) the good API date, for an event generate by an user...
link: server
3 but record it in my gmt format (Paris : gmt +1)
1. Use DateUtils.SetDateAndTime2 for...
B4A Question Conversion of Date and Time across Timezones and database storage - RickV (first post)    
May 4, 2023.
I have tried to look at the methods of DateTime api and DateUtils library especially SetTimeZoneOffset() and SetDateAndTime2() but I don't know if they will suffice or there are some gotchas.ut I'm... location in 3 different timezones (none is utc/gmt)
2. Users in each location will work in their local times but the app must save all transactions with the local values converted to head-office...
link: () and SetDateAndTime2() but I don't know if they will suffice or there are some gotchas.ut I'm...
B4A Question Time zone issue - Erel (first post)    
Jul 3, 2013SetDateAndTime2 returns the ticks value of the given time instance.
It doesn't matter what....SetDateAndTime2(2013, 8, 23, 15, 0, 0, 1)
Log(DateUtils.TicksToString(eventTime)) 'will print the local time...
link: do is:
Dim EventTime As Long = DateUtils.SetDateAndTime2(Yr, Mo, Da, Ho, Mi, 1)
You do not need...
link: . However this is not the case with the time instance set with SetDateAndTime2. You are responsible for...
link: )
Tz=DateTime.GetTimeZoneOffsetAt(UTC1)
UTC2=DateUtils.SetDateAndTime2(Yr,Mo,Da,Ho,Mi,Se,Tz...
B4A Question TimeStamp calculation - Erel (first post)    
Sep 17, 2014You can call DateUtils.SetTimeZone(0) to ignore the device time zone.
Another option is to use DateUtils.SetDateAndTime2....
B4A Question StartServiceAt UTC or Local Ticks - Erel (first post)    
Feb 11, 2021
Return DateUtils.SetDateAndTime2(DateTime.GetYear(DateTime.Now), DateTime.GetMonth(DateTime.Now), DateTime.GetDayOfMonth(DateTime.Now), _
hours, minutes, seconds, 0)
End Sub
...Another option:
Sub ParseUTCTime (time As String) As Long
Dim m As Matcher = Regex.Matcher("(\d+):(\d+):(\d+)\s(\w+)", time)
If m.Find = False Then Return 0
Dim hours As Int = m.Group(1) Mod 12
Dim minutes As Int = m.Group(2)
Dim seconds As Int = m.Group(3)
Dim am...
Games [XUI2D] Example Pack - Erel    
Oct 2, 2022   
(33 reactions)   
tags: example games, XUI2D Games following a path
- Angry birds example
- Space Shooter
- Tetris
- X2 Source Code
Video tutorial explaining the steps required for running the examples and configuring Tiled:
Note that the video is not 100% up to date. It was created before the X2 library was available. All the X2 modules are now packed as a single b4x lib.
300267245
The examples pack is a single zip with all the XUI2D examples...Updated thread based on X2 v2.0+: https://www.b4x.com/android/forum/threads/xui2d-x2-v2-0-2021...
Page: 1  
2  
3  
4  
5  
6  
7