Automatic Daylight Savings Time (DST)

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Thu May 14, 2009 9:35 pm

Jotne wrote:Is there way to change DST for all user from ACP to automatic?
No, but there's an SQL query included in install.xml that does that.

Jotne
Registered User
Posts: 364
Joined: Wed Jul 16, 2003 10:18 pm
Location: Norway

Re: Automatic Daylight Savings Time (DST)

Post by Jotne » Thu May 14, 2009 10:33 pm

Thanks, I missed that line...

Code: Select all

UPDATE phpbb_users SET user_dst = 2;
Don’t feed the Troll
Molde Cycleklubb - - http://www.moldeck.no
HP41.org - - http://forum.hp41.org

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 16981
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Automatic Daylight Savings Time (DST)

Post by DavidIQ » Sat May 23, 2009 3:40 am

MOD Updated to version 2.0.0
See first post for Download Link
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois
Contact:

Re: Automatic Daylight Savings Time (DST)

Post by Cr33per » Mon May 25, 2009 5:47 pm

What will this do ?
UPDATE phpbb_users SET user_dst = 0 WHERE user_dst = 2;
Sorry if my question is retarded. :lol:

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Mon May 25, 2009 8:00 pm

Cr33per wrote:What will this do?

Code: Select all

UPDATE phpbb_users SET user_dst = 0 WHERE user_dst = 2;
Run this query if you want to erase all automatic DST settings of your users in the database.

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Mon Jun 01, 2009 10:00 am

Instructions for updating phpBB 3.0.4 -> 3.0.5

BEFORE UPDATING:

OPEN includes/session.php

FIND

Code: Select all

		automatic_dst_session();
ADD BEFORE

Code: Select all

		if (!defined('AUTOMATIC_DST_BOARD_TIMEZONE'))
		{
			include($phpbb_root_path . 'includes/automatic_dst.' . $phpEx);
			automatic_dst_cache($this->data['user_timezone']);
		}
FIND and DELETE

Code: Select all

		$date_cache[$format]['zone_offset'] = $this->timezone + date('I', $gmepoch) * 3600;

Now do the update to phpBB 3.0.5 using the official Update Package.


AFTERWARDS

OPEN includes/session.php

FIND

Code: Select all

		$zone_offset = $this->timezone + $this->dst;
REPLACE WITH

Code: Select all

		$zone_offset = $this->timezone + date('I', $gmepoch) * 3600;

troublegum44
Registered User
Posts: 58
Joined: Wed May 13, 2009 7:46 pm

Re: Automatic Daylight Savings Time (DST)

Post by troublegum44 » Tue Jun 02, 2009 7:37 am

I didn't realise this had been validated and have installed the RC1 of this mod. I gave had a quick look and at first glance they appear to be identical.

Am I correct?

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Tue Jun 02, 2009 8:28 am

troublegum44 wrote:I didn't realise this had been validated and have installed the RC1 of this mod. I gave had a quick look and at first glance they appear to be identical.

Am I correct?
You are correct!

matrafisco
Registered User
Posts: 2
Joined: Mon Feb 19, 2007 10:10 am

Re: Automatic Daylight Savings Time (DST)

Post by matrafisco » Tue Jun 02, 2009 5:11 pm

sorry... i got confused now.

these instructions are needed for a fresh mod install on an already upgraded to 3.0.5 phpBB?
or the mod instructions will suffice?

ty.
I'm still trying to develop my acquaintance of this place.
Please, don't flame me yet.

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Tue Jun 02, 2009 11:19 pm

matrafisco wrote:sorry... i got confused now.

these instructions are needed for a fresh mod install on an already upgraded to 3.0.5 phpBB?
or the mod instructions will suffice?
If you want to update a phpBB 3.0.4 with Automatic DST installed, use these instructions.

If you want to install Automatic Daylight Savings Time to a phpBB 3.0.5 board use version 2.0.1 which you can download here (it's awaiting validation).

jwheeler
Registered User
Posts: 18
Joined: Sun Feb 22, 2009 10:15 pm

Re: Automatic Daylight Savings Time (DST)

Post by jwheeler » Thu Jun 11, 2009 1:02 am

What if we accidently installed the 3.0.4 version on a 3.0.5 board. Do i really have to uninstall it and re-install with correct files?

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Thu Jun 11, 2009 11:03 am

jwheeler wrote:What if we accidently installed the 3.0.4 version on a 3.0.5 board. Do i really have to uninstall it and re-install with correct files?
No, you'll just have to do the update from 2.0.0 to 2.0.1. You'll find the instructions in the folder /contrib.

jwheeler
Registered User
Posts: 18
Joined: Sun Feb 22, 2009 10:15 pm

Re: Automatic Daylight Savings Time (DST)

Post by jwheeler » Thu Jun 11, 2009 11:57 am

oh ok thanks

nunonina
Registered User
Posts: 3
Joined: Tue Mar 31, 2009 2:04 pm

Re: Automatic Daylight Savings Time (DST)

Post by nunonina » Fri Jun 26, 2009 9:41 am

Hi there... great mod... but I've noticed two things...

First, it's great to be able to "translate" but I was forced to make a minor adjustment since:

Code: Select all

	'automatic_dst_timezones'	=> array(
		'Africa'		=> 'África',
		'America'		=> 'América',
		'Arctic'		=> 'Ártico',
		'Asia'			=> 'Ásia',
		'Atlantic'		=> 'Atlântico',
		'Australia'		=> 'Austrália',
		'Europe'		=> 'Europa',
		'Indian'		=> 'Índico',
		'Pacific'		=> 'Pacífico',
	)
would result in having all indiana and indianapolis strings changed to Índicoa and Índicoapolis...

So, I just changed it to:

Code: Select all

	'automatic_dst_timezones'	=> array(
		'Africa/'		=> 'África/',
		'America/'		=> 'América/',
		'Arctic/'		=> 'Ártico/',
		'Asia/'			=> 'Ásia/',
		'Atlantic/'		=> 'Atlântico/',
		'Australia/'		=> 'Austrália/',
		'Europe/'		=> 'Europa/',
		'Indian/'		=> 'Índico/',
		'Pacific/'		=> 'Pacífico/',
	)
BTW, with this little change you may also translate city names with more confidence... just add to the array:

Code: Select all

		 'Lisbon' => 'Lisboa',
		 'London' => 'Londres',
First problem solved...


Second, I realized that, despite of what language the user selects in the UCP, the footer information "Time zone: Europe/Lisbon [ DST ]" will ALWAYS be board default language. To solve this issue I've moved the Automatic DST initialization code on file session.php:

Code: Select all

		if (!defined('AUTOMATIC_DST_BOARD_TIMEZONE'))
		{
			include($phpbb_root_path . 'includes/automatic_dst.' . $phpEx);
			automatic_dst_cache($this->data['user_timezone']);
		}

		automatic_dst_session();
to a bit later, just after:

Code: Select all

		// We include common language file here to not load it every time a custom language file is included
		$lang = &$this->lang;

		if (!defined('AUTOMATIC_DST_BOARD_TIMEZONE'))
		{
			include($phpbb_root_path . 'includes/automatic_dst.' . $phpEx);
			automatic_dst_cache($this->data['user_timezone']);
		}

		automatic_dst_session();
So, when Automatic DST gets initialized, the user language is already defined...

Second problem solved...


Hope this will help someone.. :D

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Automatic Daylight Savings Time (DST)

Post by MartectX » Fri Jun 26, 2009 11:17 pm

nunonina wrote:First, it's great to be able to "translate" but I was forced to make a minor adjustment [...]
Good idea, this will be in the next version!

If you send me your translation I'll add it to the package and credit your work!
nunonina wrote:Second, I realized that, despite of what language the user selects in the UCP, the footer information "Time zone: Europe/Lisbon [ DST ]" will ALWAYS be board default language.
I'll look into that. Thanks for reporting!

Locked

Return to “[3.0.x] MOD Database Releases”