I am facing a very strange behaviour in my app. This code:
var timestamp: Date?
...
timestamp?.toString(format: "yyyyMMddHHmmss")
produces some unexpected results. In 99.99% of cases everything works fine and the correct string is sent to my server. However, there was an extremely rare situation when the result which came to my server was
2018020671122 dop.
dop.
is probably a Czech equivalent of AM
.
I don't understand why this happens. There is no tt
in my format and it is explicitly stated that I want two digits for hours, not just one. My code works fine on many devices, but it keeps producing the result above on a single device (iPhone 5s, iOS 10). I cannot reach this particular device (it belongs to one of my customer out there). Any idea?