31
iHackCode
Re: How does displaying user time work?

Thanks, that was really helpful



32
iHackCode
Re: How does displaying user time work?

Oh I see. I was incorrect on the $time, $time is from time(). Which should be from the same TZ as the Server_TZ as you said.

So now I'm looking at formatTimestamp() function that calls the getUserTimestamp() function.

It returns:
return ucfirst(date($datestring$usertimestamp));


But if the timezone for date() is not UTC/GMT (set with the date_default_timezone_set()), it would change the calculated $usertimestamp.

So I guess the question is about locales, why is it used to set the timezone? Instead of date() should gmdate() be used?



33
iHackCode
How does displaying user time work?

I'm a bit lost on this. The function is below (I got it from XOOPS 2.6)

$time is the time (Unix timestamp).
* The timezone can be set by the locale.php based on the general settings (default locale) for the website.

$timeoffset is the 'user' timezone
* if user. its whats they set in their profile
* if anon. its the 'Default_TZ', from the general settings.

Now there is one more offset, the 'Server_TZ'. That is confusing me.

Looking at the logic that assigns $usertimestamp it looks like it assumes the 'Server_TZ' and $time are using the same timezone. The two time stamps might not always be the same Timezone though. So if they are not the same then the displayed timezone will be off.

When will the $time timezone change timezone:
* using a different locale (because of language)

/**
     * @param mixed  $time
     * @param string $timeoffset
     *
     * @return int
     */
    
public function getUserTimestamp($time$timeoffset '')
    {
        if (
$timeoffset == '') {
            if (
$this->isUser()) {
                
$timeoffset $this->user->getVar('timezone_offset');
            } else {
                
$timeoffset $this->getConfig('default_TZ');
            }
        }
        
$usertimestamp intval($time) + (floatval($timeoffset) - $this->getConfig('server_TZ')) * 3600;
        return (int)
$usertimestamp;
    }



34
iHackCode
Re: pls help in changing type of authentification

To set it back to use the MySQL database, use phpMyAdmin or something equivalent to edit the field in the database.

use this query to view the record that needs to be changed: (also replace <your_table_prefix> with your prefix.)
SELECT * FROM `<your_table_prefix>_config` where `conf_name` = 'auth_method'

Set the 'conf_value' for that record to 'xoops' and it should use the MySQL database again.



35
iHackCode
Re: remove publishing time from news 1.64

I believe there is a setting in the modules preferences for the Date format for the news module. If you use j.n.Y that should show you the day number.month number.year number in the news module's pages.

http://php.net/manual/en/function.date.php



36
iHackCode
Re: Installation of Jenkins with CygWin

is JAVA_HOME set.

http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html



37
iHackCode
Re: Problems with MyAlbum and photos

Your myalbum template on the page (http://roslagsloppet.com/modules/myalbum/photo.php?lid=273) has invalid html. Your <a href is missing a space and the <img src is also missing a space, there could be others, but that's what i noticed and that should fix your page issue.

The template for that file is myalbum/templates/myalbum_photo.html, but i don't see that issue in the release package for that version of MyAlbum though.



38
iHackCode
Re: Active Directory SSL connection

Glad you got it working.

I looked up the ldap_connect function to figure out why it didn't use the "LDAP - Port number". If you use a URL instead of a hostname in the first argument, the second argument for the port is not used. It uses the URL instead, if anyone was wondering.



39
iHackCode
Re: Active Directory SSL connection

You should be able to configure the authentication options "LDAP - Server Name" as ldaps://yourhostname.tld and the "LDAP - Port Number" as 636 to be able to use Active Directory over SSL.

Note: Make sure that 'Use TLS connection' is not enabled, that is for port 389 and upgrading to TLS.



40
iHackCode
Yay SeaHawks

Yay SeaHawks!




TopTop
« 1 2 3 (4) 5 6 7 ... 93 »



Login

Who's Online

171 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits