Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-04-2014, 04:10 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 23,227
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by parayna View Post
Heya ^_^ I am using this Mod (everything works great!) but do you know how I would change the time zone? I am in the UK, see, and it is set in a time zone 5 hours back (so like at 9 my time, it says it was posted at 4, for example)

Thank you ^_^ (I just want it UK time because I am from the UK XD) Also, if there is a way for it to automatically detect a user's time zone and change the times for them that would be great as well! (But I know little about coding so I have no idea how that would be possible...)
Glad it's working for you!

You can set the DateTime thingy to your timezone, but I don't think it's possible to set it to the user's timezone. Perhaps with javascript, but I'm not really sure how

Check the file newsview.php inside admincp/view, and search for this part:

PHP Code:
public function create(){
    
$mysidia Registry::get("mysidia");
    
$document $this->document;
    
$document->setTitle("Create");
        
    if(
$mysidia->input->post("submit")){
        
$todayDate = new DateTime;

                
//add the following line:
        
$todayDate->setTimezone(new DateTimeZone('Europe/London'));

        
$date $todayDate->format('Y-m-d H:i:s');
//rest of the code here 
I assumed London, but here's the list of available timezones you can use: http://php.net/manual/en/timezones.php

I just used it for my country and it's 1 hour behind lol
__________________


asp.net stole my soul.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
News Feed Yuki Night Suggestions and Feature Requests 0 01-30-2013 12:04 AM
Implementing A News Feed Yuki Night Questions and Supports 0 01-29-2013 05:25 PM
News feed script? Aasixx Staff Central 3 06-18-2012 03:06 AM
Adopts News Bloodrun Addons/Mods Graveyard 71 06-18-2009 02:13 PM
News 12345 Questions and Supports 9 05-10-2009 03:13 PM


All times are GMT -5. The time now is 06:47 PM.

Currently Active Users: 4573 (1 members and 4572 guests)
Threads: 4,081, Posts: 32,040, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636