Posts

Showing posts with the label safari

Timezones whoops in Iphone and Safari with Daylight Savings

Looping through October dates in 2015 for Sydney Australia, I was finding it weird that I had 32 days ! I'm fairly sure that wasn't how the rhyme went. Anyway, looking into it, turned out that when starting at 1/10/2015 and adding 1 day til the end of the month, you ended up with 1,2,3,3,4 - see an extra day there which seems like Sat showed up twice. Turns out, there appears to be a big in the "Spring Forward" part of the Javascript engin there where Midnight on 4/10/2015 is interpreted as actually being 3/10/2015 at 23:00, go figure. In reverse, 5/4/2015 ("Fall Back") was displayed as 5/4/2015 at 1AM!!!! See the quirks below which appears in Chrome; try on an iPhone to see for yourself. Of course it was already asked over there on at stackoverflow. Date TimeZone Offset Month Day Of Month Time UTC Hours Sun Apr 05 2015 00:00:00 GMT+1100 (AUS Eastern Daylight Time) -660 3 5 1428152400000 13 Sun Apr 05 2015 01:00:00 GMT+1100 (AUS Eastern Dayli...

Mobile Development on iphones, weird font sizes and -webkit-text-size-adjust

There are issues with CSS displays for iphones and mobile devices where the browsers are increasing the size of seemingly random pieces of content. This occurs when the browser tries to shrink the content into the screen size. This is resolved by starting development in a greenfield site with the normalize.css which resets the defaults to so that you can start from scratch and build consistent CSS! The main issue turns out to be the CSS attribute  -webkit-text-size-adjust  which will be reset to 100% (there are similar attributes  -ms-text-size-adjust for the other browser types). Of course best practice would be to not use any px measurements also so that the screen can shrink and expand naturally.