• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Mapping the current date and time

Mapping the current date and time 10 years 10 months ago #27956

  • tomicat
  • tomicat's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
I've been wracking my brains over this one for some time, so hopefully one of you wizards can help me out.

I have an RSForm mapped to create articles in my J3 site. I want to be able to take a date from a Calendar field and use it as the publish up date of the article. Now, I have this working using a hidden field with default value of:

//<code>
return date('o-m-d H:i:s');
//</code>

My problem is that when the article is created, it adds GMT (+10) to the time. So If I were to make a submission at 09:30:30, the publish up date will end up being 19:30:30.

Is there something I can do to this code to subtract the GMT from the final output, or stop it happening all together?
The administrator has disabled public write access.

Mapping the current date and time 10 years 10 months ago #27988

  • tomicat
  • tomicat's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
Finally managed to find the code that does what I need, for anyone who may have the same issue:
//<code>
$date = date("Y-m-d H:m:s", (time()-(60*60*10)));
return $date;
//</code>
The administrator has disabled public write access.
The following user(s) said Thank You: alexp
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!