How do I force a date format?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
rekabis
Registered User
Posts: 8
Joined: Sat Nov 10, 2007 7:50 am
Location: Kelowna, British Columbia, Canada
Contact:

How do I force a date format?

Post by rekabis »

Greetings!

Not sure if this is even an option, but I am curious how to ‘force’ a date format. I would still like users have the ability to choose their own time zone, but I would like to set DST to default to ‘yes’ (it wouldn’t even show up in their options) and for the date/time format to default to the ISO 8601 standard. I am not sure if I will still let them specify their own date format (I am leaning towards yes), but I would like to have the ISO 8601 format as the default at the very least.

Suggestions?
User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: How do I force a date format?

Post by karlsemple »

There is no way to really force a default for the timezone or DST settings without running a SQL query on the database to do it. It is a user option and the software allows users to set their own. Worth noting that setting the ACP board setting options will apply to all new registrations until they apply their own settings. Existing users however would need changing in the database directly.
Image
rekabis
Registered User
Posts: 8
Joined: Sat Nov 10, 2007 7:50 am
Location: Kelowna, British Columbia, Canada
Contact:

Re: How do I force a date format?

Post by rekabis »

karlsemple wrote:There is no way to really force a default for the timezone or DST settings without running a SQL query on the database to do it. It is a user option and the software allows users to set their own. Worth noting that setting the ACP board setting options will apply to all new registrations until they apply their own settings. Existing users however would need changing in the database directly.
So, what you are saying is that if I change the default in the adm to ‘Custom: Y.m.d H:i’, all newly registered users (after this change) will use that date format as the default until they change it in their own preferences?
User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: How do I force a date format?

Post by karlsemple »

rekabis wrote:<snip>

So, what you are saying is that if I change the default in the adm to ‘Custom: Y.m.d H:i’, all newly registered users (after this change) will use that date format as the default until they change it in their own preferences?
Yes, the board setting options will apply to guest and be used as the default for new registrations, after registration a member will then be able to change their custom settings in the UCP. Remember changing the settings in the ACP will not update the users settings in real time, so if you change your mind and alter them after users have registered the new setting will not be applied to existing members :)
Image
rekabis
Registered User
Posts: 8
Joined: Sat Nov 10, 2007 7:50 am
Location: Kelowna, British Columbia, Canada
Contact:

Re: How do I force a date format?

Post by rekabis »

Cool! This is good enough for me. I’m a big fan of standards, and I just wanted to make sure that what I set is the default. I’m not gonna get too teared up that I can’t prevent people from changing it, but not many ppl change the defaults anyhow. Especially on something as prosaic as the date format. I guess.

Anyhoo, thanks.
Locked

Return to “[3.0.x] Support Forum”