15:46, EEST
August 9, 2016
16:44, EEST
April 3, 2012
Hi,
As per javadocs, that method only supports parsing to the second level.
I believe the reason to be originating from https://reference.opcfoundation.org/v104/Core/docs/Part6/5.3.1/#5.3.1.6, “A DateTime value is encoded as an xs:dateTime value.”,
https://www.w3schools.com/xml/schema_dtypes_date.asp only shows second-level resolution on xs:dateTime.
As a personal opinion, where possible, I would recommend to use Java 8 time APIs (e.g. java.time.Instant) instead, and do a conversion on the boundary where you call SDK methods. If you convert to DataValue use-cases, note that UA DateTime is resolution of 100s of nanoseconds (source and serverTimestamp), the rest is 10s of picoseconds (source and serverPicoseconds), see https://reference.opcfoundation.org/v104/Core/docs/Part4/7.7.1/ for more info. Also read the javadocs of each methods in DateTime you call, since some assume java epoch (unix epoch) and others “UA Epoch” (or “windows epoch”;https://en.wikipedia.org/wiki/Epoch_(computing) ).
Most Users Ever Online: 518
Currently Online:
15 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
hbrackel: 135
pramanj: 86
Francesco Zambon: 81
rocket science: 77
ibrahim: 76
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
fred: 41
Member Stats:
Guest Posters: 0
Members: 680
Moderators: 16
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1467
Posts: 6260
Newest Members:
sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytuleModerators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5
Administrators: admin: 1