Jump to content

File:Animated clock.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (Animated SVG file, nominally 800 × 800 pixels, file size: 3 KB)

Note: Due to technical limitations, thumbnails of this file will not be animated.

This image is an animated SVG file. The .png preview above created by RSVG for use in Wikimedia is not animated and may be incomplete or incorrect. To see the animation, open media:Animated clock.svg. It should run in any modern browser or viewer. Recent versions of Chrome, Firefox, Microsoft Edge, Safari, and Opera all support SVG animated with SMIL. Other SVG animations can be found at Category:Animated SVG files.

Templates:Animated SVG/I18n
العربية  Boarisch  বাংলা  català  čeština  Deutsch  Deutsch (Sie-Form)  English  español  فارسی  suomi  français  galego  עברית  हिन्दी  magyar  հայերեն  íslenska  italiano  日本語  한국어  lietuvių  македонски  മലയാളം  Plattdüütsch  Nederlands  occitan  português  português do Brasil  русский  sicilianu  slovenščina  svenska  தமிழ்  ไทย  українська  中文  中文(简体)  中文(繁體)  +/−

Summary

Description
English: Animated clock.
Date
Source Own work
Author Grufo
Other versions
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with a text editor.
This is a retouched picture, which means that it has been digitally altered from its original version. The original can be viewed here: Station Clock.svg.

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
GNU head This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version. This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Synchronizing the clock with the current time

It is possible to synchronize the animation with the current local time by adding the following code at the end of the SVG file (before the final </svg> tag):

<script>
	var oDate = new Date(), nHours = oDate.getHours() % 12, nMinutes = oDate.getMinutes(), nSeconds = oDate.getSeconds();

	document.querySelector('.clock-second-hand').setAttribute('transform', 'rotate(' + (nSeconds * 6) + ', 400, 400)');
	document.querySelector('.clock-minute-hand').setAttribute('transform', 'rotate(' + (nMinutes * 6 + nSeconds / 10) + ', 400, 400)');
	document.querySelector('.clock-hour-hand').setAttribute('transform', 'rotate(' + (nHours * 30 + nMinutes / 2 + nSeconds / 120) + ', 400, 400)');
</script>

Currently Wikimedia Commons does not allow SVG files that contain scripts.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

image/svg+xml

c40635232b86747568283381508ccb4110fccad3

2,935 byte

800 pixel

800 pixel

10 October 2023

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current01:47, 2 February 2024Thumbnail for version as of 01:47, 2 February 2024800 × 800 (3 KB)GrufoSymmetry
05:40, 10 October 2023Thumbnail for version as of 05:40, 10 October 2023800 × 800 (3 KB)Grufo=={{int:filedesc}}== {{Information |description={{en|1=Animated clock.}} |date=2023-10-10 |source={{own}} |author=Grufo |permission= |other versions=<gallery> Station Clock.svg|Static version </gallery> }} =={{int:license-header}}== {{LGPLv3}} == Synchronizing the clock with the current time == It is possible to synchronize the animation with the current local time by adding the following code at the end of the SVG file (before the <code></svg></code> tag at the end of...
No pages on the English Wikipedia use this file (pages on other projects are not listed).

Metadata