philipp.hofmann
Members-
Content Count
62 -
Joined
-
Last visited
Everything posted by philipp.hofmann
-
TIdTime: datetime-method is not returning in local time for Android and iOS
philipp.hofmann replied to philipp.hofmann's topic in Network, Cloud and Web
Yes, I've changed it in IdGlobalProtocols.TimeZoneBias. I've tested it only with Android but I'm very sure that it's fine for MacOS/iOS also. I can test a new version of the Indy-implementation without huge effort, if this helps you. You have to send me only the pas-file to replace. -
TIdTime: datetime-method is not returning in local time for Android and iOS
philipp.hofmann replied to philipp.hofmann's topic in Network, Cloud and Web
Hi Remy, it's Result := -1 * (TTimeZone.Local.UtcOffset.TotalMinutes / 60 / 24); -
TIdTime: datetime-method is not returning in local time for Android and iOS
philipp.hofmann replied to philipp.hofmann's topic in Network, Cloud and Web
The error occurs in IdGlobalProtocols.TimeZoneBias: function TimeZoneBias: TDateTime; {$IFNDEF FPC} {$IFDEF UNIX} var T: Time_T; TV: TimeVal; UT: {$IFDEF USE_VCL_POSIX}tm{$ELSE}TUnixTime{$ENDIF}; {$ELSE} {$IFDEF USE_INLINE} inline; {$ENDIF} {$ENDIF} {$ELSE} {$IFDEF USE_INLINE} inline; {$ENDIF} {$ENDIF} begin {$IFNDEF FPC} {$IFDEF UNIX} {from http://edn.embarcadero.com/article/27890 } gettimeofday(TV, nil); T := TV.tv_sec; localtime_r({$IFNDEF USE_VCL_POSIX}@{$ENDIF}T, UT); // __tm_gmtoff is the bias in seconds from the UTC to the current time. // so I multiply by -1 to compensate for this. Result := (UT.{$IFNDEF USE_VCL_POSIX}__tm_gmtoff{$ELSE}tm_gmtoff{$ENDIF} / 60 / 60 / 24); {$ELSE} ... If I replace this with the following it's fine: function TimeZoneBias: TDateTime; {$IFNDEF FPC} {$IFDEF UNIX} var nowDt:TDateTime; {$ELSE} {$IFDEF USE_INLINE} inline; {$ENDIF} {$ENDIF} {$ELSE} {$IFDEF USE_INLINE} inline; {$ENDIF} {$ENDIF} begin {$IFNDEF FPC} {$IFDEF UNIX} nowDt:=NOW; Result := TTimeZone.Local.ToUniversalTime(nowDt)-nowDt; {$ELSE} ... So it's fine for iOS and Android. For Android/FireOS there seems an additional issue with Delphi 10.3.3. -
TIdTime: datetime-method is not returning in local time for Android and iOS
philipp.hofmann replied to philipp.hofmann's topic in Network, Cloud and Web
For me it's fine to compare with UTC time but the documentation of TIdTime says "DateTime is expressed in the timezone for the local computer". And for Windows it's matching the documentation and for Android/iOS it's not matching the documentation. That's the point. In my case I need to know the difference between the local timestamp and the server timestamp. That's the reason to use TIdTime. On Windows it's working fine, if the local time of computer A is 90 seconds ahead and of computer B it's 10 behind, I know that both computer's have a difference of 100 seconds and I have to keep this in mind for all synchronizations between both computers (it's a synchronization of video-play and it's should be insync with an accepted difference of +/-3 seconds. That's working as expected with my routine. -
Who is doing MacOS app with RadStudio for clients ?
philipp.hofmann replied to Rollo62's topic in Cross-platform
In this case I'm developing software for end consumer, so it's no solution if I have to use additional hardware or if I restrict the software to Sierra. -
I can confirm, with Delphi 10.3.1 and MacOS Sierra (-> Xcode 9.2) the BLE implementation is up and running. So I don't have to use the old Delphi Version but have the problem that my clients have to use Sierra also (-> no use case for me).
-
Who is doing MacOS app with RadStudio for clients ?
philipp.hofmann replied to Rollo62's topic in Cross-platform
I was able to use Delphi+BLE only in combination with MacOSX Sierra (or older) but not with High Sierra or Mojave -> this means it's not useable in my use case. If you know how I can use Delphi+BLE also with Mojave I'm extremly interested. -
The next step is to downgrade my second MacBookAir to Sierra. But then I can use it internally but can't delivery it to end Consumer as I can't specify the OS-Version to use.
-
Who is doing MacOS app with RadStudio for clients ?
philipp.hofmann replied to Rollo62's topic in Cross-platform
My software runs with all OS (Win32/Win64/MacOS/iOS/Android/Linux [fmxlinux]) but with MacOS the Delphi-BLE-implementation is not useable. P.S.: With Linux BLE is also not useable but there isn't any BLE implementation until now, under MacOS is an error in the existing BLE implementation. -
I have now Delphi Berlin 10.1.2 installed, PA Server 18.0 and Xcode 9.4.1 but get still the exception "BluetoothDevice is not found or disconnected" if I request "TBluetoothLEManager.startDiscovery" after I have set TBluetoothLE.enabled:=true successfully. Any other tip?
-
Ok, to increase the Chance I vote for the following issues: https://quality.embarcadero.com/browse/RSP-21029 https://quality.embarcadero.com/browse/RSP-22905
-
Hi, is there any solution for this issue in meantime? I use a MacBookAir 2018 with Mojave and XCode 10.1 with Delphi 10.3.1 and get the same error message if I want to use Bluetooth-LE on my MacBook Air. Best regards, Philipp