S2C Forum Archives

Advanced search  

News:

  Our new forum is open for business:-  New Forum
To use the new forum you will need to re-register.

Please don't post anything on this forum.

Pages: 1 [2]   Go Down

Author Topic: New Firefox 89.0 upgrade  (Read 2384 times)

timfoster

  • S2C Member
  • Chassis welder
  • *
  • Offline Offline
  • Location: Co. Down, Northern Ireland
  • Posts: 62
  • Member no : 7282
  • .:
  • 1961 SWB 2A
    • Photos of my Land Rover
Re: New Firefox 89.0 upgrade
« Reply #15 on: June 04, 2021, 10:10:13 PM »

The timezone calculation on the front page looks pretty venerable. The hack to set the timezone for the entire page is certainly interesting!

I had a go at fixing it and wonder if this might be a cleaner way to get "Solihull time":

function writeTimeLong()
{
   d = new Date();
   document.writeln(d.toLocaleTimeString('en-GB', { timeZone: 'Europe/London' }))
   document.writeln(d.toLocaleDateString('en-GB', {
      timeZone: 'Europe/London',
      weekday: 'long',
      year: 'numeric',
      month: 'long',
      day: 'numeric'}));
}

Then just remove all the other timezone related javascript functions, along with the 'ONLOAD="jsClockTimeZone()"' parameter of the body html tag, and drop the <form> stuff in favour of a script tag that just invokes "writeTimeLong()"

I'm not a web developer, but that seemed to do the trick on a copy of the page I had here locally, which I've dropped up at https://gist.github.com/timfoster/d2d0272b0a6a1ab690a238a200d4e259

Perhaps those weird hacks were there for older browser compatibility?

 - tim
Logged

timfoster

  • S2C Member
  • Chassis welder
  • *
  • Offline Offline
  • Location: Co. Down, Northern Ireland
  • Posts: 62
  • Member no : 7282
  • .:
  • 1961 SWB 2A
    • Photos of my Land Rover
Re: New Firefox 89.0 upgrade
« Reply #16 on: June 04, 2021, 10:12:46 PM »

(I think the problem was that the page was displaying in UTC still, despite our best efforts to calculate a GMT offset, or perhaps Firefox fixed a bug around BST calculation? I don't know. Javascript and browser compatibility is the devil's work!)
Logged

Wittsend

  • Administrator
  • Lord of the Bearings
  • ****
  • Offline Offline
  • Location: Norwich
  • Posts: I am a geek!!
  • .:
Re: New Firefox 89.0 upgrade
« Reply #17 on: June 04, 2021, 10:45:58 PM »

The coding I used comes from the days of Netscape and in those days browser compatibility was a problem.

I'll have a go at using your "fix".

It would be nice if I didn't have to change the code twice a year.


Logged
Who's a then ?
 

Wittsend

  • Administrator
  • Lord of the Bearings
  • ****
  • Offline Offline
  • Location: Norwich
  • Posts: I am a geek!!
  • .:
Re: New Firefox 89.0 upgrade
« Reply #18 on: June 04, 2021, 11:13:19 PM »

Well, I've put the code in place.

Everything is as it was for me - then maybe it's using my browser cache ???

Need you folks to test it, else I'll have to wait until October  :stars

If the website goes "funny" post here and I'll put toehold file back.

If those with the wrong time could login in to the S2C members area, then the time should go funny again, as I've not "updated" the time fix there yet!



 :RHD
Logged

diffwhine

  • Acting Chairman
  • Director
  • Lord of the Bearings
  • *
  • Offline Offline
  • Location: Marlborough, Wiltshire
  • Posts: 5106
  • Member no : 6762
  • .:
Re: New Firefox 89.0 upgrade
« Reply #19 on: June 04, 2021, 11:19:15 PM »

Its showing the right time now. Many thanks.
Logged
1965 88" Station Wagon
1968 Rover 1 Air Portable

Wittsend

  • Administrator
  • Lord of the Bearings
  • ****
  • Offline Offline
  • Location: Norwich
  • Posts: I am a geek!!
  • .:
Re: New Firefox 89.0 upgrade
« Reply #20 on: June 04, 2021, 11:24:10 PM »

If time has been fixed for all, then I'll give Mr Tim Foster a credit and update the time in the members only section.

The Forum time is a totally different thing handled by the SMF forum software and that more or less looks after itself.

Just have to cure the hash # in text problem.


 :RHD
Logged

Bonnet-rouge

  • S2C Member
  • Chassis welder
  • *
  • Offline Offline
  • Location: Pays Bigouden
  • Posts: 73
  • Member no : 6807
  • .:
Re: New Firefox 89.0 upgrade
« Reply #21 on: June 05, 2021, 07:50:40 AM »

Both times the same here  :tiphat
Logged
The earth is flat …🌎

diffwhine

  • Acting Chairman
  • Director
  • Lord of the Bearings
  • *
  • Offline Offline
  • Location: Marlborough, Wiltshire
  • Posts: 5106
  • Member no : 6762
  • .:
Re: New Firefox 89.0 upgrade
« Reply #22 on: June 05, 2021, 07:53:29 AM »

So it wasn't just me having a mental aberration then!
Logged

Wittsend

  • Administrator
  • Lord of the Bearings
  • ****
  • Offline Offline
  • Location: Norwich
  • Posts: I am a geek!!
  • .:
Re: New Firefox 89.0 upgrade
« Reply #23 on: June 05, 2021, 09:01:40 AM »

Time is a funny thing...

This topic is really about Firefox and wether it's working properly with the forum.


Logged

Peter Holden

  • S2C Vehicle Registration Officer
  • Director
  • Lord of the Bearings
  • *
  • Offline Offline
  • Location: Adlington Lancashire
  • Posts: 3977
  • Member no : 4528
  • .:
  • Peter Holden
Re: New Firefox 89.0 upgrade
« Reply #24 on: June 05, 2021, 06:24:29 PM »

It is cos your are Irish and have to be different  (I dont really mean that)

Peter
Logged
A Yorkshireman on missionary duty in Lancashire

diffwhine

  • Acting Chairman
  • Director
  • Lord of the Bearings
  • *
  • Offline Offline
  • Location: Marlborough, Wiltshire
  • Posts: 5106
  • Member no : 6762
  • .:
Re: New Firefox 89.0 upgrade
« Reply #25 on: June 05, 2021, 07:48:49 PM »

The Irish have to be different to the English. We have to have something to argue about! This time is a time difference , next time it could just be just Gaelic superiority...  :neener
Logged

timfoster

  • S2C Member
  • Chassis welder
  • *
  • Offline Offline
  • Location: Co. Down, Northern Ireland
  • Posts: 62
  • Member no : 7282
  • .:
  • 1961 SWB 2A
    • Photos of my Land Rover
Re: New Firefox 89.0 upgrade
« Reply #26 on: June 10, 2021, 09:18:38 PM »

Sorry, just catching up on this post - it looks like the page still has all of the old timezone-offset calculation code still in place, perhaps with a different hardcoded hour-offset, rather than the changes I'd suggested on the github gist url above? (I see my name in the credits though, so it's definitely not cached content :-)

Like I say though, perhaps that old code is more compatible with older browsers, so maybe it's good enough. If the code works for people now, that's totally fine by me - nothing wrong with applying a big hammer to solve a problem, every now and then!

- tim
Logged

diffwhine

  • Acting Chairman
  • Director
  • Lord of the Bearings
  • *
  • Offline Offline
  • Location: Marlborough, Wiltshire
  • Posts: 5106
  • Member no : 6762
  • .:
Re: New Firefox 89.0 upgrade
« Reply #27 on: June 10, 2021, 09:23:18 PM »

Tim,
Its all ancient Greek to me! I can't understand one word of what you are talking about!  :tiphat

My IT knowledge is evidently more basic than I probably thought!
Logged

Alan Drover

  • S2C Member
  • Lord of the Bearings
  • *
  • Offline Offline
  • Location: North West Hampshire
  • Posts: 3006
  • Member no : 7511
  • .:
Re: New Firefox 89.0 upgrade
« Reply #28 on: June 10, 2021, 09:27:04 PM »

A 2 year old has more IT knowledge than I have. I don't know how to post photos on forums (fora?).
I'm purely mechanical.
Logged
Series 3 owner but interested in all Land Rovers.
'Being born was my first big mistake!'

Dopey

  • S2C Member
  • Master of the oils
  • *
  • Offline Offline
  • Location: Outer Mongolia
  • Posts: 736
  • Member no : 8197
  • .:
Re: New Firefox 89.0 upgrade
« Reply #29 on: June 11, 2021, 05:59:13 PM »

The time is all wrong for Outer Mongolia  ???
Logged
Roads? Who Needs Roads.

Get more than 3 pensioners together and they will form a committee.

Been with the S2C since 2002
Pages: 1 [2]   Go Up
 

Page created in 0.114 seconds with 23 queries.