Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8047579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:09:00+00:00 2026-06-05T06:09:00+00:00

Ok, this may be a simple question, maybe I am thinking about this all

  • 0

Ok, this may be a simple question, maybe I am thinking about this all wrong. Who knows.

Anyway, I am using Zend Framework and I am attempting to use cookies for the first time in it. So from my understanding cookies in Zend use a format like:

Wednesday, 28-Feb-05 20:41:22 UTC

for the expires. So I am trying to figure out how to take time() and convert it to a similar date() variation of the above that is 2 hours in the future and UTC. But like I said I think I am over thinking it, so I need confirmation.

My thoughts is

$cookie_expire = time()+7200;
$cookie_expire = date('l, d-M-y H:i:s Z', $cookie_expire);

And I wanna say this is correct, however something in my head doesn’t sit well with the notion so, hopefully someone can tell me if I am off on the idea or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:09:01+00:00Added an answer on June 5, 2026 at 6:09 am

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

    See the comment by Glen @ 4-Dec-2007 04:32:

    This routine can help obtain a UTC timestamp:
    
    <?php
    $utc_str = gmdate("M d Y H:i:s", time());
    $utc = strtotime($utc_str);
    ?>
    

    Replace the time() with the timestamp you want to convert.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a simple question though can´t figure out how to do it.
This may be very simple question,But please help me. i wanted to know what
Okay this may be a simple question but I have yet to come with
I'm fairly new to Android programming, so this may be a simple question, but
this may be a very simple question, but is it possible to force a
may be too simple groovy question but....please help i have a list like this:
This may seem like a simple question but i am getting an error when
This may seem a very silly question. Consider this: I have a simple Boolean
This maybe a really simple question but for some reason my code isn't working.
Ok, so this may seem an elementary question. Maybe it is. But for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.