Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision f649ded43f091c7788ac076fc2e73fb8fee4bd35)
+++ src/Actions/Makefile.am	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -219,5 +219,6 @@
   WorldAction/RepeatBoxAction.cpp \
   WorldAction/ScaleBoxAction.cpp \
-  WorldAction/SetDefaultNameAction.cpp
+  WorldAction/SetDefaultNameAction.cpp \
+  WorldAction/SetWorldTimeAction.cpp
 WORLDACTIONHEADER = \
   WorldAction/AddEmptyBoundaryAction.hpp \
@@ -230,5 +231,6 @@
   WorldAction/RepeatBoxAction.hpp \
   WorldAction/ScaleBoxAction.hpp \
-  WorldAction/SetDefaultNameAction.hpp
+  WorldAction/SetDefaultNameAction.hpp \
+  WorldAction/SetWorldTimeAction.hpp
 
 
Index: src/Actions/WorldAction/SetWorldTimeAction.cpp
===================================================================
--- src/Actions/WorldAction/SetWorldTimeAction.cpp	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
+++ src/Actions/WorldAction/SetWorldTimeAction.cpp	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -0,0 +1,76 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * SetWorldTimeAction.cpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "WorldTime.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "Actions/WorldAction/SetWorldTimeAction.hpp"
+
+// and construct the stuff
+#include "SetWorldTimeAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr WorldSetWorldTimeAction::performCall() {
+  // create undo state
+  int oldtime;
+  oldtime = WorldTime::getInstance().getTime();
+  WorldSetWorldTimeState *UndoState = new WorldSetWorldTimeState(oldtime, params);
+
+  // obtain information
+  getParametersfromValueStorage();
+
+  WorldTime::getInstance().setTime(params.newtime);
+  DoLog(0) && (Log() << Verbose(0) << "Current time step is now: " << WorldTime::getInstance().getTime() << "." << endl);
+  return Action::state_ptr(UndoState);
+}
+
+Action::state_ptr WorldSetWorldTimeAction::performUndo(Action::state_ptr _state) {
+  WorldSetWorldTimeState *state = assert_cast<WorldSetWorldTimeState*>(_state.get());
+
+  WorldTime::getInstance().setTime(state->oldtime);
+  DoLog(0) && (Log() << Verbose(0) << "Current time step is now again: " << WorldTime::getInstance().getTime() << "." << endl);
+
+  return Action::state_ptr(_state);
+}
+
+Action::state_ptr WorldSetWorldTimeAction::performRedo(Action::state_ptr _state){
+  WorldSetWorldTimeState *state = assert_cast<WorldSetWorldTimeState*>(_state.get());
+
+  WorldTime::getInstance().setTime(state->params.newtime);
+  DoLog(0) && (Log() << Verbose(0) << "Current time step is now: " << WorldTime::getInstance().getTime() << "." << endl);
+
+  return Action::state_ptr(_state);
+}
+
+bool WorldSetWorldTimeAction::canUndo() {
+  return true;
+}
+
+bool WorldSetWorldTimeAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/WorldAction/SetWorldTimeAction.def
===================================================================
--- src/Actions/WorldAction/SetWorldTimeAction.def	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
+++ src/Actions/WorldAction/SetWorldTimeAction.def	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -0,0 +1,33 @@
+/*
+ * SetWorldTimeAction.def
+ *
+ *  Created on: Feb 07, 2011
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+
+
+// i.e. there is an integer with variable name Z that can be found in
+// ValueStorage by the token "Z" -> first column: int, Z, "Z"
+// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
+#define paramtypes (int)
+#define paramtokens ("set-world-time")
+#define paramdescriptions ("new time step")
+#define paramdefaults ("0")
+#define paramreferences (newtime)
+
+#define statetypes (int)
+#define statereferences (oldtime)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY World
+#define MENUNAME "world"
+#define MENUPOSITION 11
+#define ACTIONNAME SetWorldTime
+#define TOKEN "set-world-time"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "set current time step to use"
+#undef SHORTFORM
Index: src/Actions/WorldAction/SetWorldTimeAction.hpp
===================================================================
--- src/Actions/WorldAction/SetWorldTimeAction.hpp	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
+++ src/Actions/WorldAction/SetWorldTimeAction.hpp	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -0,0 +1,22 @@
+/*
+ * SetWorldTimeAction.hpp
+ *
+ *  Created on: May 8, 2010
+ *      Author: heber
+ */
+
+#ifndef SETWORLDTIMEACTION_HPP_
+#define SETWORLDTIMEACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "SetWorldTimeAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* SETWORLDTIMEACTION_HPP_ */
Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision f649ded43f091c7788ac076fc2e73fb8fee4bd35)
+++ tests/regression/Makefile.am	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -74,4 +74,5 @@
 	$(srcdir)/Options/FastParsing/testsuite-options-fast-parsing.at \
 	$(srcdir)/Options/SetDefaultName/testsuite-options-set-default-name.at \
+	$(srcdir)/Options/SetWorldTime/testsuite-options-set-world-time.at \
 	$(srcdir)/Options/Empty/testsuite-options-empty-configs.at \
 	$(srcdir)/Options/InvalidCommands/testsuite-options-invalid-commands.at \
Index: tests/regression/Options/SetWorldTime/testsuite-options-set-world-time.at
===================================================================
--- tests/regression/Options/SetWorldTime/testsuite-options-set-world-time.at	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
+++ tests/regression/Options/SetWorldTime/testsuite-options-set-world-time.at	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -0,0 +1,11 @@
+### molecule default name
+
+AT_SETUP([Standard Options - set world time with Undo/Redo])
+AT_KEYWORDS([options])
+AT_CHECK([../../molecuilder --set-world-time 10], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Current time step is now: 10" stdout], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --set-world-time 10 --undo], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Current time step is now again: 0" stdout], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --set-world-time 10 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Current time step is now: 10" stdout], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Options/testsuite-options.at
===================================================================
--- tests/regression/Options/testsuite-options.at	(revision f649ded43f091c7788ac076fc2e73fb8fee4bd35)
+++ tests/regression/Options/testsuite-options.at	(revision aa04aec0a6f98bba03446ef81b876c0dee5f6db8)
@@ -23,4 +23,7 @@
 m4_include([Options/SetDefaultName/testsuite-options-set-default-name.at])
 
+# world time
+m4_include([Options/SetWorldTime/testsuite-options-set-world-time.at])
+
 # test that all desire parameters and count how many complain
 m4_include([Options/Empty/testsuite-options-empty-configs.at])
