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 9067315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:54:26+00:00 2026-06-16T16:54:26+00:00

I was trying to compile this example program using GCC (tested versions 4.5.1, 4.6.3,

  • 0

I was trying to compile this example program using GCC (tested versions 4.5.1, 4.6.3, 4.8.4):

#include <iostream>
#include <iomanip>
#include <ctime>
#include <chrono>

using std::chrono::system_clock;

int main()
{
    system_clock::time_point now = system_clock::now();
    std::time_t now_c = system_clock::to_time_t(
                            now - std::chrono::hours(24));
    std::cout << "One day ago, the time was "
              << std::put_time(std::localtime(&now_c), "%F %T") << '\n';
}

But it tells me:

prog.cpp: In function 'int main()':
prog.cpp:14:18: error: 'put_time' is not a member of 'std'

I thought, probably it’s not implemented yet. So I tried to check the implementation status for this function. I only found this page:

  • http://gcc.gnu.org/projects/cxx0x.html

but there I could not find any note on put_time or chrono or alike. Can anyone point me to a resource that provides information on the implementation status for this library?

  • 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-16T16:54:27+00:00Added an answer on June 16, 2026 at 4:54 pm

    See TODO extended iomanip manipulators std::get_time and std::put_time for gcc 4.8.0.

    See also Cross Platform way to get the time of day? claiming that is not implemented in 4.7.0.


    UPDATE: As the gcc developer Jonathan Wakely confirmed below: The std::get_time and std::put_time manipulators are still missing in gcc 4.9.


    UPDATE: Jonathan Wakely closed this ticket on 22 Dec, 2014:

    Fixed for GCC 5

    Thanks simonwo for letting me know about it.

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

Sidebar

Related Questions

When trying to compile this code: #include <iostream> #include <vector> using namespace std; class
I'm trying to compile this simple program to start learning how to use timers:
When I'm trying to compile this code with gcc version 4.6.3 on linux with
Having this errors when trying to compile/run my app using Maven. I've succeeded to
when I'm trying to compile my c program it gives me this error warning:
Trying to build the following simple example #include <boost/python.hpp> using namespace boost::python; tuple head_and_tail(object
i have this C++ program (actually it's just a snippet) : #include <iostream> #include
I'm trying to compile a block of example code using Thrust in an attempt
I am trying to compile an example C program and link it to some
I am using an example program from this code http://sicktoolbox.sourceforge.net/ > http://sourceforge.net/projects/sicktoolbox/files/ . It's

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.