--- title: Date.prototype.getUTCSeconds() slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds tags: - Date - JavaScript - Method - Prototype - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds --- <div>{{JSRef}}</div> <p>Die <strong><code>getUTCSeconds()</code></strong> Methode gibt die Sekunden der Zeit bezüglich der Weltzeit zurück.</p> <div>{{EmbedInteractiveExample("pages/js/date-getutcseconds.html")}}</div> <h2 id="Syntax">Syntax</h2> <pre class="syntaxbox"><code><var>dateObj</var>.getUTCSeconds()</code></pre> <h3 id="Rückgabewert">Rückgabewert</h3> <p>Eine ganze Zahl zwischen 0 und 59, die die Sekunden des gegebenen Date-Objektes bezüglich der Weltzeit (UTC) angibt.</p> <h2 id="Beispiele">Beispiele</h2> <h3 id="Einsatz_von_getUTCSeconds()">Einsatz von <code>getUTCSeconds()</code></h3> <p>Das folgende Beispiel weist der Variablen <code>seconds</code> die aktuelle Sekunde zu.</p> <pre class="brush: js">var today = new Date(); var seconds = today.getUTCSeconds(); </pre> <h2 id="Spezifikationen">Spezifikationen</h2> <table class="standard-table"> <tbody> <tr> <th scope="col">Spezifikation</th> <th scope="col">Status</th> <th scope="col">Kommentar</th> </tr> <tr> <td>{{SpecName('ES1')}}</td> <td>{{Spec2('ES1')}}</td> <td>Initiale Definition. Implementiert in JavaScript 1.3.</td> </tr> <tr> <td>{{SpecName('ES5.1', '#sec-15.9.5.23', 'Date.prototype.getUTCSeconds')}}</td> <td>{{Spec2('ES5.1')}}</td> <td> </td> </tr> <tr> <td>{{SpecName('ES6', '#sec-date.prototype.getutcseconds', 'Date.prototype.getUTCSeconds')}}</td> <td>{{Spec2('ES6')}}</td> <td> </td> </tr> <tr> <td>{{SpecName('ESDraft', '#sec-date.prototype.getutcseconds', 'Date.prototype.getUTCSeconds')}}</td> <td>{{Spec2('ESDraft')}}</td> <td> </td> </tr> </tbody> </table> <h2 id="Browserkompatibilität">Browserkompatibilität</h2> <p>{{Compat("javascript.builtins.Date.getUTCSeconds")}}</p> <h2 id="Siehe_auch">Siehe auch</h2> <ul> <li>{{jsxref("Date.prototype.getSeconds()")}}</li> <li>{{jsxref("Date.prototype.setUTCSeconds()")}}</li> </ul>