The Site Time Location module displays the site location and the current time based on the configured timezone. The time updates every second on the screen.
- Drupal 8 or 9
-
Download the module: Place the
site_time_location
module in themodules/custom
directory of your Drupal installation. -
Enable the module:
drush en site_time_location
Or enable it through the Drupal admin UI by navigating to Extend and enabling the Site Time Location module.
-
Navigate to Configuration Form: Go to
Admin -> Configuration -> System -> Site Time Location Settings
or directly access/admin/config/system/site-time-location-settings
. -
Set Location and Timezone:
- Country: Enter the country name.
- City: Enter the city name.
- Timezone: Select the appropriate timezone from the dropdown list.
-
Save Configuration.
-
Add Time Location Block:
- Go to
Admin -> Structure -> Block Layout
. - Click on Place block in the region where you want to display the block.
- Search for Time Location Block and click Place block.
- Configure the block settings as needed and click Save block.
- Go to
-
View the Block:
- The block will display the configured country, city, and the current time based on the selected timezone.
- The time will update every second dynamically.
This project is licensed under the MIT License. EOF