<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[time functions]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich habe ein Datum und eine Zeit die ich so erstelle</p>
<pre><code>struct tm t1;
memset( &amp;t1, 0, sizeof(t1 ));
t1.tm_mon = 9;
t1.tm_mday = 11;
t1.tm_year = 2010;
t1.tm_sec = 59;
t1.tm_min = 59;
t1.tm_hour = 23;
time_t time1 = mktime( &amp;t1 );	//convert tm to time_h
</code></pre>
<p>Ich gebe time1 einem objekt und dieses speichere ich in einem vektor.<br />
jedoch wenn ich das Datum &amp; Zeit ausgeben will krieg ich immmer eine -1.</p>
<pre><code>cout &lt;&lt; &quot;Time: &quot;&lt;&lt; m_vektor[i].getTime()&lt;&lt; endl;
</code></pre>
<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/320345/time-functions</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 04:50:43 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/320345.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Sep 2013 08:19:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 08:19:12 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich habe ein Datum und eine Zeit die ich so erstelle</p>
<pre><code>struct tm t1;
memset( &amp;t1, 0, sizeof(t1 ));
t1.tm_mon = 9;
t1.tm_mday = 11;
t1.tm_year = 2010;
t1.tm_sec = 59;
t1.tm_min = 59;
t1.tm_hour = 23;
time_t time1 = mktime( &amp;t1 );	//convert tm to time_h
</code></pre>
<p>Ich gebe time1 einem objekt und dieses speichere ich in einem vektor.<br />
jedoch wenn ich das Datum &amp; Zeit ausgeben will krieg ich immmer eine -1.</p>
<pre><code>cout &lt;&lt; &quot;Time: &quot;&lt;&lt; m_vektor[i].getTime()&lt;&lt; endl;
</code></pre>
<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355324</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355324</guid><dc:creator><![CDATA[90äpfel]]></dc:creator><pubDate>Wed, 25 Sep 2013 08:19:12 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 08:31:05 GMT]]></title><description><![CDATA[<pre><code>t1.tm_year = 2010 - 1900;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2355329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355329</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Wed, 25 Sep 2013 08:31:05 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 09:10:26 GMT]]></title><description><![CDATA[<p>jetzt krieg ich 1349865213</p>
<p>muss ich vlt time_h zu tm zurück convertieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355338</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355338</guid><dc:creator><![CDATA[90äpfel]]></dc:creator><pubDate>Wed, 25 Sep 2013 09:10:26 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 09:11:07 GMT]]></title><description><![CDATA[<p>Wasn unnoetiges memset.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355339</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355339</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Wed, 25 Sep 2013 09:11:07 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 09:34:45 GMT]]></title><description><![CDATA[<p>90äpfel schrieb:</p>
<blockquote>
<p>jetzt krieg ich 1349865213</p>
<p>muss ich vlt time_h zu tm zurück convertieren?</p>
</blockquote>
<p>Was erwartest du?<br />
Du hast jetzt die Sekunden seit dem 1.1.1970 00:00</p>
<p>Achte auf die Zeitzone!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355354</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Wed, 25 Sep 2013 09:34:45 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 09:38:43 GMT]]></title><description><![CDATA[<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Wasn unnoetiges memset.</p>
</blockquote>
<p>Das sieht generell nach einem C/C++-Mischmasch aus - der <em>elaborate type specifier</em> hat da auch nichts verloren...</p>
<p>Du solltest wohl eher das hier schreiben:</p>
<pre><code>auto time = m_vektor[i].getTime();
cout &lt;&lt; &quot;Time: &quot;&lt;&lt; std::ctime(&amp;time) &lt;&lt; endl;
</code></pre>
<p>Denn wie DirkB schon angemerkt hat, enthält <code>time_t</code> nur die Sekunden seit 1.1.1970.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355357</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Wed, 25 Sep 2013 09:38:43 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 09:40:54 GMT]]></title><description><![CDATA[<p>Sone schrieb:</p>
<blockquote>
<p>der <em>elaborate type specifier</em> hat da auch nichts verloren...</p>
</blockquote>
<p>Ich finds ja super, dass du weisst was das ist. Aber koenntest du bitte aufhoeren, mit Begriffen um dich zu werfen, die kein normaler Mensch versteht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355358</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355358</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Wed, 25 Sep 2013 09:40:54 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 09:48:43 GMT]]></title><description><![CDATA[<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Sone schrieb:</p>
<blockquote>
<p>der <em>elaborate type specifier</em> hat da auch nichts verloren...</p>
</blockquote>
<p>Ich finds ja super, dass du weisst was das ist. Aber koenntest du bitte aufhoeren, mit Begriffen um dich zu werfen, die kein normaler Mensch versteht?</p>
</blockquote>
<p>Den benutzen auch <a href="http://www.c-plusplus.net/forum/305970#2232646" rel="nofollow">andere</a>. Aber gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355362</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355362</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Wed, 25 Sep 2013 09:48:43 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 10:06:16 GMT]]></title><description><![CDATA[<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Sone schrieb:</p>
<blockquote>
<p>der <em>elaborate type specifier</em> hat da auch nichts verloren...</p>
</blockquote>
<p>Ich finds ja super, dass du weisst was das ist. Aber koenntest du bitte aufhoeren, mit Begriffen um dich zu werfen, die kein normaler Mensch versteht?</p>
</blockquote>
<p>Was macht man denn, wenn man ein Fachwort nicht versteht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355369</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 25 Sep 2013 10:06:16 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 10:41:44 GMT]]></title><description><![CDATA[<p>Glaubst du ernsthaft, das ist hilfreich, wenn Sone diese Begriffe gegenueber Anfaengern verwendet? Also ich nicht. Daher steckt dir deinen Ratschlag sonstwohin.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355380</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Wed, 25 Sep 2013 10:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 10:52:30 GMT]]></title><description><![CDATA[<blockquote>
<p>Glaubst du ernsthaft, das ist hilfreich, wenn Sone diese Begriffe gegenueber Anfaengern verwendet?</p>
</blockquote>
<p>Google ich elaborated type specifier, sind gleich die ersten zwei Ergebnisse hilfreiche Erklärungen.<br />
Und wer sagt eigentlich, dass ich sie <strong>gegenüber</strong> Anfängern verwende? Ich habe sie gegenüber dir verwendet. Ich habe <strong>dich</strong> zitiert. <strong>Dir</strong> geanwortet. Ich weiß nicht, wie oft schon irgendwo Fachwörter gefallen sind, zwischen zwei alten Hasen (ich bin natürlich keiner, aber oft waren's zwei), die solche Fachwörter nutzen?</p>
<p>Wenn Anfänger nicht googlen können, dann ist das ihr Problem.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355386</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Wed, 25 Sep 2013 10:52:30 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:01:11 GMT]]></title><description><![CDATA[<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Glaubst du ernsthaft, das ist hilfreich, wenn Sone diese Begriffe gegenueber Anfaengern verwendet?</p>
</blockquote>
<p>Ja. Woher sollen sie die sonst lernen? Wenn jemand nicht googlen kann dann weiß man auch gleich, dass das sonst nichts wird.</p>
<blockquote>
<p>Daher steckt dir deinen Ratschlag sonstwohin.</p>
</blockquote>
<p>Geht's noch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355388</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:01:11 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:12:53 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Glaubst du ernsthaft, das ist hilfreich, wenn Sone diese Begriffe gegenueber Anfaengern verwendet?</p>
</blockquote>
<p>Ja. Woher sollen sie die sonst lernen?</p>
</blockquote>
<p>Gibts keine anderen Quellen mehr als Sones Ergüsse?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355396</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:12:53 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:21:31 GMT]]></title><description><![CDATA[<p>Belli schrieb:</p>
<blockquote>
<p>SeppJ schrieb:</p>
<blockquote>
<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Glaubst du ernsthaft, das ist hilfreich, wenn Sone diese Begriffe gegenueber Anfaengern verwendet?</p>
</blockquote>
<p>Ja. Woher sollen sie die sonst lernen?</p>
</blockquote>
<p>Gibts keine anderen Quellen mehr als Sones Ergüsse?</p>
</blockquote>
<p>Doch, aber Sones Ergüsse sind eine mögliche Quelle. Warum diese trocken legen?</p>
<p>Gerade hier ist doch ein exzellentes Beispiel für die Benutzung eines Fachworts: Der Begriff ist feststehend und verbreitet, daher leicht zu recherchieren. Sone hat sogar den Begriff markiert, damit man sieht, dass es ein Fachwort ist. Eine Umschreibung des Begriffs hätte 1-2 Zeilen Text benötigt, die wahrscheinlich weniger gut als Beschreibung gewesen wären, als die nachschlagbare Lexikondefinition.<br />
Wer nicht googeln kann, der hat ganz andere Probleme, da drauf braucht man keine Rücksicht zu nehmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355401</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355401</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:21:31 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:29:09 GMT]]></title><description><![CDATA[<p>Habs hinbekommen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> Danke an alle</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355403</guid><dc:creator><![CDATA[90äpfel]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:29:09 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:31:21 GMT]]></title><description><![CDATA[<p>Man muss nicht alles mit Gewalt verkomplizieren, so wie Sone das betreibt, nur um Klugscheissen zu koennen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355406</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:31:21 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:37:28 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Gerade hier ist doch ein exzellentes Beispiel für die Benutzung eines Fachworts: Der Begriff ist feststehend und verbreitet</p>
</blockquote>
<p>Der Begriff ist überhaupt nicht verbreitet. &quot;Elaborate type specifier&quot; ist ein typischer Standard-Term, die in extrem formellen Diskussionen verwendet wird, wo der Kontext klar ist. Ich würde von keinem fortgeschrittenen C++-Entwickler erwarten, dass er diesen Begriff kennt. Er hat auch keine besondere Relevanz in C++.</p>
<p>In diesem Beispiel hätte Sone stattdessen einfach &quot;struct&quot; sagen können, und es wäre allen klar gewesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355410</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355410</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:37:28 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:40:47 GMT]]></title><description><![CDATA[<blockquote>
<p>Ja. Woher sollen sie die sonst lernen? Wenn jemand nicht googlen kann dann weiß man auch gleich, dass das sonst nichts wird.</p>
</blockquote>
<p>Dann sollte aber auch die Behauptung richtig sein. Der type specifier muss da sein. Er muss nur nicht zwingend ein elaborated type specifier sein.</p>
<p>@90Aepfel: Es reicht</p>
<pre><code>tm
</code></pre>
<p>statt</p>
<pre><code>struct tm
</code></pre>
<p>um den Typ anzugeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355414</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355414</guid><dc:creator><![CDATA[elaborator]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:40:47 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:46:50 GMT]]></title><description><![CDATA[<p>90äpfel schrieb:</p>
<blockquote>
<p>Habs hinbekommen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> Danke an alle</p>
</blockquote>
<p>Gut, dann kann der Thread ja jetzt abkommen.</p>
<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Man muss nicht alles mit Gewalt verkomplizieren, so wie Sone das betreibt, nur um Klugscheissen zu koennen.</p>
</blockquote>
<p>Nein, das muss man nicht. Aber wenn ich ganz penibel auf meine Ausdrucksweise zurückblicke, selbst dann sehe ich kein Problem.. Man muss auch nicht aus einer Fliege einen Elefanten machen, wie du es gerade getan hast.</p>
<blockquote>
<p>Ich würde von keinem fortgeschrittenen C++-Entwickler erwarten, dass er diesen Begriff kennt.</p>
</blockquote>
<p>Ich schon. Merkwürdig, auf einmal wissen Kellerautomat, Nexus, SeppJ, und höchstwahrscheinlich noch so einige anderen, was es heißt.</p>
<blockquote>
<p>, die in extrem formellen Diskussionen verwendet wird, wo der Kontext klar ist.</p>
</blockquote>
<p>Das ändert nichts an der Tatsache: Man kann es googlen. Ich könnte jetzt auch von SFINAE reden. Kennt jemand nicht? Er braucht nur eine Minute, um herauszufinden was es heißt. Abgesehen davon, dass elaborated type specifier nun mal wirklich trivial sind, und - wie bereits erwähnt - in zwei Sätzen erklärbar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355416</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355416</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:46:50 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 11:50:30 GMT]]></title><description><![CDATA[<p>Kellerautomat schrieb:</p>
<blockquote>
<p>Glaubst du ernsthaft, das ist hilfreich, wenn Sone diese Begriffe gegenueber Anfaengern verwendet? Also ich nicht. Daher steckt dir deinen Ratschlag sonstwohin.</p>
</blockquote>
<p>nu guck sich mal einer diesen rotzlöffel an!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355421</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355421</guid><dc:creator><![CDATA[prustpffrt]]></dc:creator><pubDate>Wed, 25 Sep 2013 11:50:30 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 12:13:07 GMT]]></title><description><![CDATA[<p>Muss mich da Kellerautomat anschließen. Sones Posts sind voller völlig deplazierter Begriffe aus dem Standard nur um ein bisschen klugzuscheißen. Ich werfe doch nicht google an um mir so ein völlig irrelevantes Detail anzueignen. Deshalb hinkt auch der Vergleich mit SFINAE.</p>
<p>Sone schrieb:</p>
<blockquote>
<blockquote>
<p>Ich würde von keinem fortgeschrittenen C++-Entwickler erwarten, dass er diesen Begriff kennt.</p>
</blockquote>
<p>Ich schon.</p>
</blockquote>
<p>[/quote]</p>
<p>Du bist einfach nur ein Hobby-Programmierer der seit ein paar Monaten im Standard stöbert aber von Software-Entwicklung nichts, aber auch garnichts weiß. Ich würde wetten, dass &gt;98% der beruflichen C++-Entwickler mit dem Ausdruck nichts anfangen können. Hör endlich auf deine gequirlte Scheiße hier zu verbreiten.</p>
<p>Inb4 määäääääh ein unreg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355438</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355438</guid><dc:creator><![CDATA[lolalter]]></dc:creator><pubDate>Wed, 25 Sep 2013 12:13:07 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 12:23:55 GMT]]></title><description><![CDATA[<blockquote>
<p>Sones Posts sind voller völlig deplazierter Begriffe aus dem Standard nur um ein bisschen klugzuscheißen.</p>
</blockquote>
<p>In dem Post hier ist ein 'deplazierter' Begriff, dessen Deplaziertheit schon von einem Moderator in Frage gestellt wurde. Guck mal genau nach. Und in den anderen Posts hier im Forum. Zeig mir noch mehr von denen. Wenn du in jedem Post zwei bis drei findest, dann hattest du Recht. Sonst ist dein Geschwafel nur leeres Geschwafel.</p>
<p>Ach, du findest nichts, ja? Tjo. Nächstes mal richtig machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355440</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355440</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Wed, 25 Sep 2013 12:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to time functions on Wed, 25 Sep 2013 12:28:04 GMT]]></title><description><![CDATA[<p>Ignorieren &gt; aufregen<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/2122.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--trade_mark"
      title=":trade_mark:"
      alt="™"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2355442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2355442</guid><dc:creator><![CDATA[nwp3]]></dc:creator><pubDate>Wed, 25 Sep 2013 12:28:04 GMT</pubDate></item></channel></rss>